"use strict";var e=require("../common/vendor.js"),t=require("../api/adv.js"),i=require("../api/index.js");require("../common/request.js");const a={data:()=>({advs:[],advImgs:[],tabIndex:1,id:null,item:{}}),onLoad(e){this.id=e.id},onShow(){this.getAdvList(),this.getFamousPrescribeById()},onShareAppMessage(e){if(this.$isLogin())return{title:this.item.prescribeName,path:"/pages_index/famousPrescribeDetails?id="+this.id,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},onShareTimeline(e){if(this.utils.isLogin())return{title:this.item.title,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},methods:{handleAdvClick(t){var i=this.advs[t];console.log(i.advUrl),1==i.showType?(e.index.setStorageSync("url",i.advUrl),e.index.navigateTo({url:"h5"})):2==i.showType?e.index.navigateTo({url:i.advUrl}):3==i.showType&&(e.index.setStorageSync("content",i.content),e.index.navigateTo({url:"content"}))},getAdvList(){var i=this;t.getAdvList({advType:9}).then((t=>{200==t.code?(i.advImgs=[],i.advs=[],t.data.forEach((function(e){null!=e.imageUrl&&""!=e.imageUrl&&(i.advs.push(e),i.advImgs.push(e.imageUrl))}))):e.index.showToast({icon:"none",title:"请求失败"})}))},tabClick(e){this.tabIndex=e},getFamousPrescribeById(){let t={id:this.id};i.getFamousPrescribeById(t).then((t=>{200==t.code?this.item=t.data:e.index.showToast({icon:"none",title:"请求失败"})}),(e=>{}))}}};if(!Array){e.resolveComponent("u-swiper")()}Math;var n=e._export_sfc(a,[["render",function(t,i,a,n,s,d){return e.e({a:null!=s.item},null!=s.item?e.e({b:s.item.imgUrl,c:e.t(s.item.prescribeName),d:e.t(s.item.pinyin),e:e.t(s.item.actionTitle),f:e.o((e=>d.tabClick(1))),g:e.n(1==s.tabIndex?"tab1 active":"tab1"),h:e.o((e=>d.tabClick(2))),i:e.n(2==s.tabIndex?"tab2 active":"tab2"),j:e.o((e=>d.tabClick(3))),k:e.n(3==s.tabIndex?"tab3 active":"tab3"),l:e.o((e=>d.tabClick(4))),m:e.n(4==s.tabIndex?"tab4 active":"tab4"),n:1==s.tabIndex},1==s.tabIndex?{o:s.item.descs}:{},{p:2==s.tabIndex},2==s.tabIndex?{q:s.item.action}:{},{r:3==s.tabIndex},3==s.tabIndex?{s:s.item.usageMethod}:{},{t:4==s.tabIndex},4==s.tabIndex?{v:s.item.msg}:{},{w:e.o(d.handleAdvClick),x:e.p({list:s.advImgs,indicator:!0,indicatorMode:"line",circular:!0})}):{})}]]);a.__runtimeHooks=6,wx.createPage(n);
