"use strict";var e=require("../common/vendor.js"),i=require("../api/adv.js"),t=require("../api/index.js");require("../common/request.js");const s={data:()=>({advs:[],advImgs:[],tabIndex:1,item:{}}),onLoad(e){this.id=e.id},onShow(){this.getAdvList(),this.getVesselById()},onShareAppMessage(e){if(this.$isLogin())return{title:this.item.vesselName,path:"/pages_index/vesselDetails?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.vesselName,imageUrl:"https://hos-1309931967.cos.ap-chongqing.myqcloud.com/fs/20230106/6b459adfb1004c1a96219bcdf07e337c.png"}},methods:{handleAdvClick(i){var t=this.advs[i];console.log(t.advUrl),1==t.showType?(e.index.setStorageSync("url",t.advUrl),e.index.navigateTo({url:"h5"})):2==t.showType?e.index.navigateTo({url:t.advUrl}):3==t.showType&&(e.index.setStorageSync("content",t.content),e.index.navigateTo({url:"content"}))},getAdvList(){var t=this;i.getAdvList({advType:5}).then((i=>{200==i.code?(t.advImgs=[],t.advs=[],i.data.forEach((function(e){null!=e.imageUrl&&""!=e.imageUrl&&(t.advs.push(e),t.advImgs.push(e.imageUrl))}))):e.index.showToast({icon:"none",title:"请求失败"})}))},getVesselById(){let i={id:this.id};t.getVesselById(i).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(s,[["render",function(i,t,s,a,n,o){return e.e({a:null!=n.item},null!=n.item?{b:n.item.imgUrl,c:e.t(n.item.vesselName),d:e.t(n.item.pinyin),e:e.t(n.item.actionTitle),f:n.item.descs,g:e.o(o.handleAdvClick),h:e.p({list:n.advImgs,indicator:!0,indicatorMode:"line",circular:!0})}:{})}]]);s.__runtimeHooks=6,wx.createPage(a);
