You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
7.8 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesB/pages/activity/SeckillDetails/index"],{"0401":function(t,e,r){"use strict";var s=r("514a"),i=r.n(s);i.a},"0a2a":function(t,e,r){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s=r("70e6"),i=r("2df4"),o=(r("83c1"),r("aa63")),a=function(){r.e("components/ProductConSwiper").then(function(){return resolve(r("a7e0"))}.bind(null,r)).catch(r.oe)},c=function(){r.e("components/CountDown").then(function(){return resolve(r("fdd5"))}.bind(null,r)).catch(r.oe)},n=function(){r.e("components/ProductWindow").then(function(){return resolve(r("9157"))}.bind(null,r)).catch(r.oe)},u=function(){r.e("components/StorePoster").then(function(){return resolve(r("cd35"))}.bind(null,r)).catch(r.oe)},l={name:"SeckillDetails",components:{ProductConSwiper:a,CountDown:c,ProductWindow:n,StorePoster:u},props:{},data:function(){return{seckillStatus:"",domStatus:!1,posterData:{image:"",title:"",price:"",code:""},posterImageStatus:!1,action:"",imgUrls:[],storeInfo:[],replyCount:0,reply:[],cartNum:1,attrTxt:"请选择",productValue:[],attrValue:"",attr:{cartAttr:!1,productAttr:[],productSelect:{}},datatime:0,userCollect:!1}},onShow:function(){this.mountedStart()},methods:{formatPrice:function(t,e){return console.log(t),t?t.split(".")[e]:""},onShareAppMessage:function(){return{title:this.storeInfo.title,imageUrl:this.storeInfo.image,path:"pages/activity/GoodsSeckill/index?id="+this.storeInfo.id+"&spread="+t.getStorageSync("uid")+"&pageType=good&codeType=routine",success:function(e){t.showToast({title:"分享成功"})},fail:function(e){t.showToast({title:"分享失败",icon:"none"})}}},openAlone:function(){this.$yrouter.push({path:"/pages/shop/GoodsCon/index",query:{id:this.storeInfo.productId}})},routerGo:function(t){this.$yrouter.push({path:"/pages/user/CustomerList/index"})},setCollect:function(){var t=this,e=t.storeInfo.id,r="product";t.userCollect?(0,o.getCollectDel)(e,r).then((function(){t.userCollect=!t.userCollect})):(0,o.getCollectAdd)(e,r).then((function(){t.userCollect=!t.userCollect}))},mountedStart:function(){var t=this;console.log(this);var e=t.$yroute.query.id;this.seckillStatus=t.$yroute.query.status,t.datatime=parseInt(t.$yroute.query.time),(0,s.getSeckillDetail)(e).then((function(e){t.userCollect=e.data.userCollect,e.data.storeInfo.description=e.data.storeInfo.description.replace(/\<img/gi,'<img style="max-width:100%;height:auto;"'),t.$set(t.attr,"productAttr",e.data.productAttr),t.$set(t,"productValue",e.data.productValue),t.$set(t,"storeInfo",e.data.storeInfo),t.$set(t,"imgUrls",e.data.storeInfo.sliderImageArr),t.$set(t,"replyCount",e.data.replyCount),t.$set(t,"reply",e.data.reply),t.posterData.image=t.storeInfo.image_base,t.updateTitle(),t.storeInfo.title.length>30?t.posterData.title=t.storeInfo.title.substring(0,30)+"...":t.posterData.title=t.storeInfo.title,t.posterData.price=t.storeInfo.price,t.posterData.code=t.storeInfo.code_base,t.domStatus=!0,t.DefaultSelect()}))},updateTitle:function(){},setPosterImageStatus:function(){this.posterImageStatus=!this.posterImageStatus},DefaultSelect:function(){for(var t=this.attr.productAttr,e=[],r=0;r<t.length;r++)this.$set(t[r],"index",0),e.push(t[r].attrValueArr[0]);var s=this.productValue[e.sort().join(",")];console.log(s),s&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",s.image),this.$set(this.attr.productSelect,"price",s.seckillPrice),this.$set(this.attr.productSelect,"stock",s.seckillStock),this.$set(this.attr.productSelect,"unique",s.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"attrValue",e.sort().join(",")),this.$set(this,"attrTxt","已选择")):!s&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.title),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.seckillPrice),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSe