1 |
- require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/points_mall/integral_goods_details"],{"10ff":function(t,e,i){"use strict";i.r(e);var r=i("4414"),s=i.n(r);for(var o in r)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(o);e["default"]=s.a},"27dc":function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){return r}));var r={jyfParser:function(){return Promise.all([i.e("common/vendor"),i.e("components/jyf-parser/jyf-parser")]).then(i.bind(null,"22ab"))}},s=function(){var t=this,e=t.$createElement,i=(t._self._c,parseFloat(t.storeInfo.integral)),r=parseFloat(t.storeInfo.integral),s=parseFloat(t.storeInfo.integral)&&parseFloat(t.storeInfo.price),o=parseFloat(t.storeInfo.price),a=t.attribute.productAttr.length,u=a?t.skuArr.length:null,n=a&&u>1?t.skuArr.slice(0,4):null,c=a&&u>1?t.skuArr.length:null;t.$mp.data=Object.assign({},{$root:{m0:i,m1:r,m2:s,m3:o,g0:a,g1:u,l0:n,g2:c}})},o=[]},"2e65":function(t,e,i){},"3c42":function(t,e,i){"use strict";var r=i("2e65"),s=i.n(r);s.a},4414:function(t,e,i){"use strict";(function(t){var r=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var s,o=r(i("9523")),a=i("26cb"),u=i("74b1"),n=(i("5679"),i("8e8a")),c=i("328e"),h=(i("4818"),r(i("5c3b"))),l=getApp(),d=(s={computed:(0,a.mapGetters)(["isLogin"]),mixins:[h.default],data:function(){return{dataShow:0,id:0,time:0,countDownHour:"00",countDownMinute:"00",countDownSecond:"00",storeInfo:[],imgUrls:[],parameter:{navbar:"1",return:"1",title:"抢购详情页",color:!1},attribute:{cartAttr:!1,productAttr:[],productSelect:{}},productValue:[],isOpen:!1,attr:"请选择",attrValue:"",status:1,isAuto:!1,isShowAuth:!1,iShidden:!1,limitNum:1,iSplus:!1,replyCount:0,reply:[],replyChance:0,navH:"",navList:["商品","详情"],opacity:0,scrollY:0,topArr:[],toView:"",height:0,heightArr:[],lock:!1,scrollTop:0,tagStyle:{img:"width:100%;display:block;",table:"width:100%",video:"width:100%"},datatime:"",navActive:0,meunHeight:0,backH:"",posters:!1,weixinStatus:!1,posterImageStatus:!1,storeImage:"",PromotionCode:"",posterImage:"",actionSheetHidden:!1,cart_num:1,homeTop:20,returnShow:!0,H5ShareBox:!1,routineContact:0,selectSku:{},skuArr:[]}},components:{productConSwiper:function(){i.e("components/productConSwiper/index").then(function(){return resolve(i("9248"))}.bind(null,i)).catch(i.oe)},productWindow:function(){Promise.all([i.e("common/vendor"),i.e("components/productWindow/index")]).then(function(){return resolve(i("c8cb"))}.bind(null,i)).catch(i.oe)},cusPreviewImg:function(){i.e("components/cusPreviewImg/index").then(function(){return resolve(i("d256"))}.bind(null,i)).catch(i.oe)},kefuIcon:function(){i.e("components/kefuIcon/index").then(function(){return resolve(i("c4c6"))}.bind(null,i)).catch(i.oe)},"jyf-parser":function(){Promise.all([i.e("common/vendor"),i.e("components/jyf-parser/jyf-parser")]).then(function(){return resolve(i("22ab"))}.bind(null,i)).catch(i.oe)},countDown:function(){i.e("components/countDown/index").then(function(){return resolve(i("8030"))}.bind(null,i)).catch(i.oe)}}},(0,o.default)(s,"computed",(0,a.mapGetters)(["isLogin"])),(0,o.default)(s,"watch",{isLogin:{handler:function(t,e){},deep:!0}}),(0,o.default)(s,"onLoad",(function(e){var i=this,r=this,s=getCurrentPages();r.returnShow=1!==s.length,t.getSystemInfo({success:function(t){r.height=t.windowHeight,t.statusBarHeight}}),this.isLogin&&(0,c.silenceBindingSpread)(),this.navH=l.globalData.navHeight;var o=t.getMenuButtonBoundingClientRect();if(this.meunHeight=o.height,this.backH=r.navH/2+this.meunHeight/2,e.scene){var a=this.$util.getUrlParams(decodeURIComponent(e.scene));if(!a.id)return this.$util.Tips({title:"缺少参数无法查看商品"},{tab:3,url:1});this.id=a.id,a.spid&&(l.globalData.spid=a.spid),a.time&&(this.datatime=a.time)}e.id&&(this.id=e.id,this.datatime=Number(e.time),this.status=e.status),this.getIntegralProductDetail(),this.$nextTick((function(){var e=t.getMenuButtonBoundingClientRect(),r=t.createSelectorQuery().in(i);r.select("#home").boundingClientRect((function(t){i.homeTop=2*e.top+e.height-t.height})).exec()}))})),(0,o.default)(s,"onShow",(function(){t.removeStorageSync("form_type_cart")})),(0,o.default)(s,"methods",{authColse:function(t){this.isShowAuth=t},showImg:function(t){this.$refs.cusPreviewImg.open(this.selectSku.suk)},changeSwitch:function(t){var e=this,i=this.skuArr[t];this.$set(this,"selectSku",i);var r=i.suk.split(",");r.forEach((function(t,i){e.$set(e.attribute.productAttr[i],"index",r[i])})),i&&(this.$set(this.attribute.productSelect,"image",i.image),this.$set(this.attribute.productSelect,"price",i.price),this.$set(this.attribute.productSelect,"integral",i.integral),this.$set(this.attribute.productSelect,"stock",i.stock),this.$set(this.attribute.productSelect,"unique",i.unique),this.$set(this.attribute.productSelect,"cart_num",1),this.$set(this.attribute.productSelect,"vip_price",i.vip_price),this.$set(this,"attrValue",i.suk),this.$set(this,"attrTxt","已选择"))},iptCartNum:function(t){var e=parseInt(this.attribute.productSelect.quota)>=parseInt(t)?parseInt(t):parseInt(this.attribute.productSelect.quota);""!=t&&null!=t&&void 0!=t||(e=1),this.$set(this.attribute.productSelect,"cart_num",e),this.$set(this,"cart_num",e)},returns:function(){t.navigateBack()},onLoadFun:function(t){this.isShowAuth=!1},getIntegralProductDetail:function(){var e=this,i=this;(0,u.getIntegralProductDetail)(i.id).then((function(r){e.dataShow=1;var s=r.data.storeInfo.title;for(var o in e.storeInfo=r.data.storeInfo,e.imgUrls=r.data.storeInfo.images,e.storeInfo.description&&(e.storeInfo.description=e.storeInfo.description.replace(/<img/gi,'<img style="max-width:100%;height:auto;float:left;display:block" '),e.storeInfo.description=e.storeInfo.description.replace(/<video/gi,'<video style="width:100%;height:auto;display:block" ')),e.attribute.productAttr=r.data.productAttr,e.productValue=r.data.productValue,r.data.productValue){var a=r.data.productValue[o];i.skuArr.push(a)}e.$set(e,"selectSku",i.skuArr[0]),e.attribute.productSelect.num=r.data.storeInfo.num,e.replyCount=r.data.replyCount,e.reply=r.data.reply?[r.data.reply]:[],e.replyChance=r.data.replyChance,i.routineContact=r.data.routine_contact_type,t.setNavigationBarTitle({title:s.substring(0,7)+"..."}),i.DefaultSelect(),l.globalData.openPages="/pages/activity/goods_seckill_details/index?id="+i.id+"&time="+i.time+"&status="+i.status+"&spid="+i.storeInfo.uid})).catch((function(t){i.$util.Tips({title:t},{tab:3})}))},setShare:function(){this.$wechat.isWeixin()&&this.$wechat.wechatEvevt(["updateAppMessageShareData","updateTimelineShareData","onMenuShareAppMessage","onMenuShareTimeline"],{desc:this.storeInfo.info,title:this.storeInfo.title,link:location.href,imgUrl:this.storeInfo.image}).then((function(t){})).catch((function(t){}))},DefaultSelect:function(){var t=this.attribute.productAttr,e=[];for(var i in this.productValue)if(this.productValue[i].quota>0){e=this.attribute.productAttr.length?i.split(","):[];break}for(var r=0;r<t.length;r++)this.$set(t[r],"index",e[r]);var s=this.productValue[e.join(",")];s&&t.length?(this.$set(this.attribute.productSelect,"store_name",this.storeInfo.title),this.$set(this.attribute.productSelect,"image",s.image),this.$set(this.attribute.productSelect,"price",s.price),this.$set(this.attribute.productSelect,"integral",s.integral),this.$set(this.attribute.productSelect,"stock",s.stock),this.$set(this.attribute.productSelect,"unique",s.unique),this.$set(this.attribute.productSelect,"quota",s.quota),this.$set(this.attribute.productSelect,"quota_show",s.quota_show),this.$set(this.attribute.productSelect,"product_stock",s.product_stock),this.$set(this.attribute.productSelect,"cart_num",1),this.$set(this,"attrValue",e.join(",")),this.attrValue=e.join(",")):!s&&t.length?(this.$set(this.attribute.productSelect,"store_name",this.storeInfo.title),this.$set(this.attribute.productSelect,"image",this.storeInfo.image),this.$set(this.attribute.productSelect,"price",this.storeInfo.price),this.$set(this.attribute.productSelect,"integral",this.storeInfo.integral),this.$set(this.attribute.productSelect,"quota",0),this.$set(this.attribute.productSelect,"quota_show",0),this.$set(this.attribute.productSelect,"product_stock",0),this.$set(this.attribute.productSelect,"stock",0),this.$set(this.attribute.productSelect,"unique",""),this.$set(this.attribute.productSelect,"cart_num",0),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择")):s||t.length||(this.$set(this.attribute.productSelect,"store_name",this.storeInfo.title),this.$set(this.attribute.productSelect,"image",this.storeInfo.image),this.$set(this.attribute.productSelect,"price",this.storeInfo.price),this.$set(this.attribute.productSelect,"integral",this.storeInfo.integral),this.$set(this.attribute.productSelect,"stock",this.storeInfo.stock),this.$set(this.attribute.productSelect,"quota",this.storeInfo.quota),this.$set(this.attribute.productSelect,"product_stock",this.storeInfo.product_stock),this.$set(this.attribute.productSelect,"unique",this.storeInfo.unique||""),this.$set(this.attribute.productSelect,"cart_num",1),this.$set(this.attribute.productSelect,"quota",s.quota),this.$set(this.attribute.productSelect,"product_stock",s.product_stock),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},selecAttr:function(){this.attribute.cartAttr=!0},onMyEvent:function(){this.$set(this.attribute,"cartAttr",!1),this.$set(this,"isOpen",!1)},ChangeCartNum:function(t){var e=this.productValue[this.attrValue];if(this.cart_num&&(e.cart_num=this.cart_num,this.attribute.productSelect.cart_num=this.cart_num),void 0!==e||this.attribute.productAttr.length||(e=this.attribute.productSelect),void 0!==e){e.stock,e.quota_show,e.quota,e.product_stock;var i=this.attribute.productSelect;this.storeInfo.num;if(void 0==e.cart_num&&(e.cart_num=1),t)i.cart_num<this.attribute.productSelect.quota&&(i.cart_num++,this.$set(this.attribute.productSelect,"cart_num",i.cart_num),this.$set(this,"cart_num",i.cart_num),this.$set(this.attribute.productSelect,"cart_num",i.cart_num));else{if(1==i.cart_num)return;i.cart_num--,this.$set(this,"cart_num",i.cart_num),this.$set(this.attribute.productSelect,"cart_num",i.cart_num)}}},attrVal:function(t){this.attribute.productAttr[t.indexw].index=this.attribute.productAttr[t.indexw].attr_values[t.indexn]},ChangeAttr:function(t){this.$set(this,"cart_num",1);var e=this.productValue[t];e?(this.$set(this.attribute.productSelect,"image",e.image),this.$set(this.attribute.productSelect,"price",e.price),this.$set(this.attribute.productSelect,"integral",e.integral),this.$set(this.attribute.productSelect,"stock",e.stock),this.$set(this.attribute.productSelect,"unique",e.unique),this.$set(this.attribute.productSelect,"cart_num",1),this.$set(this.attribute.productSelect,"quota",e.quota),this.$set(this.attribute.productSelect,"quota_show",e.quota_show),this.$set(this,"attrValue",t),this.attrTxt="已选择"):(this.$set(this.attribute.productSelect,"image",this.storeInfo.image),this.$set(this.attribute.productSelect,"price",this.storeInfo.price),this.$set(this.attribute.productSelect,"integral",this.storeInfo.integral),this.$set(this.attribute.productSelect,"stock",0),this.$set(this.attribute.productSelect,"unique",""),this.$set(this.attribute.productSelect,"cart_num",0),this.$set(this.attribute.productSelect,"quota",0),this.$set(this.attribute.productSelect,"quota_show",0),this.$set(this,"attrValue",""),this.attrTxt="已选择")},scroll:function(t){var e=t.detail.scrollTop,i=e/200;if(i=i>1?1:i,this.opacity=i,this.scrollY=e,this.lock)this.lock=!1;else for(var r=0;r<this.topArr.length;r++)if(e<this.topArr[r]-l.globalData.navHeight/2+this.heightArr[r]){this.navActive=r;break}},tap:function(t,e){var i=t.id;e=e;this.toView=i,this.navActive=e,this.lock=!0,this.scrollTop=e>0?this.topArr[e]-l.globalData.navHeight/2:this.topArr[e]},goCat:function(){if(this.isLogin){var e=this.productValue[this.attrValue];if(this.isOpen?this.attribute.cartAttr=!0:this.attribute.cartAttr=!this.attribute.cartAttr,!0===this.attribute.cartAttr&&0==this.isOpen)return this.isOpen=!0;if(this.attribute.productAttr.length&&void 0===e&&1==this.isOpen)return l.$util.Tips({title:"请选择属性"});if(this.cart_num<=0)return l.$util.Tips({title:"请选择数量"});this.isOpen=!1,t.navigateTo({url:"/pages/points_mall/integral_order?unique=".concat(e.unique,"&num=").concat(this.cart_num||1)})}else(0,n.toLogin)()}}),s);e.default=d}).call(this,i("543d")["default"])},"5f8b":function(t,e,i){"use strict";(function(t,e){var r=i("4ea4");i("59a4");r(i("66fd"));var s=r(i("d253"));t.__webpack_require_UNI_MP_PLUGIN__=i,e(s.default)}).call(this,i("bc2e")["default"],i("543d")["createPage"])},d253:function(t,e,i){"use strict";i.r(e);var r=i("27dc"),s=i("10ff");for(var o in s)["default"].indexOf(o)<0&&function(t){i.d(e,t,(function(){return s[t]}))}(o);i("3c42");var a=i("f0c5"),u=Object(a["a"])(s["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);e["default"]=u.exports}},[["5f8b","common/runtime","common/vendor"]]]);
|