"use strict";var e=require("../common/vendor.js"),i=require("../api/disease.js"),s=require("../api/adv.js");require("../common/request.js");const t={data:()=>({advs:[],advImgs:[],diseaseId:null,item:{}}),onLoad(e){this.diseaseId=e.diseaseId},onShow(){this.getAdvList(),this.getDiseaseById()},onShareAppMessage(e){if(this.$isLogin())return{title:this.item.diseaseName,path:"/pages_index/diseaseDetails?id="+this.diseaseId,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},onShareTimeline(e){if(this.utils.isLogin())return{title:this.item.diseaseName,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},methods:{handleAdvClick(i){var s=this.advs[i];console.log(s.advUrl),1==s.showType?(e.index.setStorageSync("url",s.advUrl),e.index.navigateTo({url:"h5"})):2==s.showType?e.index.navigateTo({url:s.advUrl}):3==s.showType&&(e.index.setStorageSync("content",s.content),e.index.navigateTo({url:"content"}))},getAdvList(){var i=this;s.getAdvList({advType:7}).then((s=>{200==s.code?(i.advImgs=[],i.advs=[],s.data.forEach((function(e){null!=e.imageUrl&&""!=e.imageUrl&&(i.advs.push(e),i.advImgs.push(e.imageUrl))}))):e.index.showToast({icon:"none",title:"请求失败"})}))},getDiseaseById(){let s={diseaseId:this.diseaseId};i.getDiseaseById(s).then((i=>{200==i.code?this.item=i.data:e.index.showToast({icon:"none",title:"请求失败"})}),(e=>{}))}}};if(!Array){e.resolveComponent("u-swiper")()}Math;var a=e._export_sfc(t,[["render",function(i,s,t,a,d,n){return e.e({a:null!=d.item},null!=d.item?{b:d.item.diseaseName,c:d.item.symptom,d:d.item.diagnose,e:d.item.inspect,f:e.o(n.handleAdvClick),g:e.p({list:d.advImgs,indicator:!0,indicatorMode:"line",circular:!0})}:{})}]]);t.__runtimeHooks=6,wx.createPage(a);
