"use strict";var e=require("../common/vendor.js"),d=require("../api/adv.js"),l=require("../api/index.js");require("../common/request.js");const r={data(){return{advs:[],advImgs:[],tabIndex:1,articleId:null,item:{}}},onLoad(t){this.id=t.id},onShow(){this.getChineseMedicineById(),this.getAdvList()},onShareAppMessage(t){if(this.$isLogin())return{title:this.item.medicineName,path:"/pages_index/chineseMedicineDetails?id="+this.id,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},onShareTimeline(t){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 n=this.advs[t];console.log(n.advUrl),n.showType==1?(e.index.setStorageSync("url",n.advUrl),e.index.navigateTo({url:"h5"})):n.showType==2?e.index.navigateTo({url:n.advUrl}):n.showType==3&&(e.index.setStorageSync("content",n.content),e.index.navigateTo({url:"content"}))},getAdvList(){var t=this,n={advType:8};d.getAdvList(n).then(o=>{o.code==200?(t.advImgs=[],t.advs=[],o.data.forEach(function(s){s.imageUrl!=null&&s.imageUrl!=""&&(t.advs.push(s),t.advImgs.push(s.imageUrl))})):e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"})})},tabClick(t){this.tabIndex=t},getChineseMedicineById(){let t={id:this.id};l.getChineseMedicineById(t).then(n=>{n.code==200?this.item=n.data:e.index.showToast({icon:"none",title:"\u8BF7\u6C42\u5931\u8D25"})},n=>{})}}};Array||e.resolveComponent("u-swiper")();const m=()=>"../uni_modules/uview-plus/components/u-swiper/u-swiper.js";Math||m();function h(t,n,o,s,i,a){return e.e({a:i.item!=null},i.item!=null?e.e({b:i.item.imgUrl,c:e.t(i.item.medicineName),d:e.t(i.item.pinyin),e:e.t(i.item.actionTitle),f:e.o(c=>a.tabClick(1)),g:e.n(i.tabIndex==1?"tab1 active":"tab1"),h:e.o(c=>a.tabClick(2)),i:e.n(i.tabIndex==2?"tab2 active":"tab2"),j:e.o(c=>a.tabClick(3)),k:e.n(i.tabIndex==3?"tab3 active":"tab3"),l:e.o(c=>a.tabClick(4)),m:e.n(i.tabIndex==4?"tab4 active":"tab4"),n:i.tabIndex==1},i.tabIndex==1?{o:i.item.descs}:{},{p:i.tabIndex==2},i.tabIndex==2?{q:i.item.action}:{},{r:i.tabIndex==3},i.tabIndex==3?{s:i.item.usageMethod}:{},{t:i.tabIndex==4},i.tabIndex==4?{v:i.item.msg}:{},{w:e.o(a.handleAdvClick),x:e.p({list:i.advImgs,indicator:!0,indicatorMode:"line",circular:!0})}):{})}var u=e._export_sfc(r,[["render",h],["__file","E:/Project/2023/\u95EE\u8BCA\u5E73\u53F0/his_user_miniapp/pages_index/chineseMedicineDetails.vue"]]);r.__runtimeHooks=6;wx.createPage(u);
