(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-product-miaosha"],{"298c":function(t,e,a){"use strict";var o=a("5acc"),i=a.n(o);i.a},"3b76":function(t,e,a){"use strict";var o=a("4ea4");a("a4d3"),a("e01a"),a("4160"),a("ac1f"),a("5319"),a("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=o(a("ade3")),n=o(a("5530"));a("96cf");var s,r=o(a("1da1")),d=o(a("244a")),c=a("90fd"),l=a("26cb"),u=(o(a("2151")),a("82dc")),p=a("8ded"),f=a("380e"),g=o(a("d936")),v=o(a("1d0b")),h=o(a("8a4f")),m=o(a("4b23")),b=o(a("c517")),y=o(a("6808")),w=o(a("0555")),k=o(a("533e")),_={components:{uniNumberBox:d.default,guessLike:w.default,topSwiper:g.default,productContent:v.default,discounts:h.default,freshDetail:m.default,contentText:b.default,productBottom:y.default,estimate:k.default},data:function(){return{product_id:0,goodsStore:0,specList:[],buys_show:!0,buys_shows:!1,specSelected:[],specClass:"none",many:1,reply:"",list:"",type:1,goodsType:0,goodsNumber:1,goodsid:"",description:"",goodsObjact:{percent:1},imgList:[],actionPrice:0,actionImage:"",good_list:"",goodsNumberMax:0,seckillObj:{stopTime:0,stop:!1,stopTimeH:0,stopTimeM:0,stopTimeS:0,stopTimeD:0,upTime:0},pink:{id:"",uid:"",people:"",price:"",stop_time:"",nickname:"",avatar:"",count:"",h:"",i:"",s:""},userInfo:"",isVip:"0"}},filters:{parseIntTo:function(t){return t=100*+t,t%1===0||(t=t.toFixed(1)),t}},onLoad:function(t){var e=this;return(0,r.default)(regeneratorRuntime.mark((function a(){var o,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:console.log(e.options),o=e,(0,u.userinfo)({}).then((function(t){var e=t.data;o.userInfo=e,console.log(e,"123456")})),e.goodsid=t.id,e.goodsType=t.type,t.spread&&uni.setStorageSync("spread",t.spread),t.isVip&&(o.isVip=t.isVip,console.log(t,"isVip")),console.log(o.isVip,"vip"),(0,p.saveUrl)(),e.seckillGoods(),i=uni.getStorageSync("weichatBrowser")||"",i&&(0,f.weixindata)();case 12:case"end":return a.stop()}}),a)})))()},computed:(0,n.default)({},(0,l.mapState)(["weichatObj","baseURL","urlFile"])),methods:(s={toFavorite:function(t){var e=this;t.userCollect=!t.userCollect,t.userCollect?collectAdd({id:e.goodsid,category:"product"}).then((function(t){uni.showToast({title:"成功加入收藏",type:"top",duration:1500})})):collectDel({id:e.goodsid,category:"product"}).then((function(t){uni.showToast({title:"成功取消收藏",type:"top",duration:1500})}))},selectSpec:function(t,e,a){e.attr_value.forEach((function(t){t.check=!1})),t.check=!0;var o=this;o.specSelected[a]=t.attr;var i=o.specSelected.join(",");o.productValue[i]?(o.buys_show=!0,o.buys_shows=!1,o.actionPrice=o.productValue[i].price,o.goodsNumberMax=o.productValue[i].stock,o.actionImage=o.productValue[i].image,o.uniqueId=o.productValue[i].unique,o.goodsStore=o.productValue[i].stock):(o.buys_show=!1,o.buys_shows=!0),0==o.goodsStore&&(o.buys_show=!1,o.buys_shows=!0),o.specSelected[a]=t.attr},specOPne:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,e=this;e.specClass="show",e.type=t},toggleSpec:function(t){var e=this;"show"===this.specClass?(this.specClass="hide",setTimeout((function(){e.specClass="none"}),250)):"none"===this.specClass&&(this.specClass="show"),this.type=t},Getcoupon:function(){uni.navigateTo({url:"/pages/coupon/getcoupon"})},numberChange:function(t){this.goodsNumber=t.number},shareDate:function(){var t=this,e=window.location.href+"&spread="+this.userInfo.uid,a=uni.getStorageSync("weichatBrowser")||"";if(a){e=e.replace(/[\?,&]from=singlemessage/g,"");var o={link:e,imgUrl:t.goodsObjact.image,desc:t.goodsObjact.store_info,title:t.goodsObjact.store_name,success:function(t){console.log(t)}};console.log(o,"分享"),(0,f.shareLoad)(o)}},navToDetailPage:function(t){var e=t.id;uni.navigateTo({url:"/pages/product/product?id="+e})},navTo:function(t){uni.navigateTo({url:"/pages/product/reply?id="+this.goodsid})},Addcar:function(t){var e=this;(0,c.cartAdd)({cartNum:"1",uniqueId:"",new:0,mer_id:"",productId:t.id}).then((function(t){uni.showToast({title:"成功加入购物车",type:"top",duration:500,icon:"none"}),e.seckillGoods()})).catch((function(t){console.log(t)}))},seckillGoods:function(){var t=this;(0,c.seckillGoods)({},this.goodsid).then((function(e){var a=e.data;t.list=a,console.log(t.list,"list"),t.product_id=a.productValue["默认"].product_id,console.log(t.product_id,"obj.product_id"),t.good_list=a.good_list,t.reply=a.reply;var o=a.storeInfo;if(t.goodsObjact=o,console.log(a.storeInfo,"基本商品"),null!=t.goodsObjact.description&&(t.description=t.goodsObjact.description.replace(/\