"use strict";var e=require("../common/vendor.js"),t=require("../api/integral.js");require("../common/request.js");const i={data:()=>({imgs:[],activeImg:1,goodsId:null,item:{}}),onLoad(e){this.goodsId=e.goodsId},onShow(){this.getIntegralGoodsById()},methods:{submit(){e.index.navigateTo({url:"./integralOrderPay?goodsId="+this.goodsId})},swiperChange(e){this.activeImg=e.detail.current+1},showImg(){e.index.previewImage({urls:this.imgs,current:this.imgs[0]})},getIntegralGoodsById(){let i={goodsId:this.goodsId};t.getIntegralGoodsById(i).then((t=>{200==t.code?(this.item=t.data,null!=t.data.images?this.imgs=t.data.images.split(","):this.activeImg=0,console.log(this.imgs)):e.index.showToast({icon:"none",title:"请求失败"})}),(e=>{}))}}};var s=e._export_sfc(i,[["render",function(t,i,s,o,g,a){return{a:e.f(g.imgs,((e,t,i)=>({a:e,b:t}))),b:e.o(((...e)=>a.swiperChange&&a.swiperChange(...e))),c:e.t(g.activeImg),d:e.t(g.imgs.length),e:e.o((e=>a.showImg())),f:e.t(g.item.goodsName),g:e.t(g.item.integral),h:e.t(g.item.otPrice.toFixed(2)),i:g.item.descs,j:e.t(g.item.integral),k:e.o((e=>a.submit()))}}]]);wx.createPage(s);
