(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods_details/index"],{"2bfc":function(t,e,i){"use strict";i.r(e);var s=i("b082"),o=i.n(s);for(var n in s)"default"!==n&&function(t){i.d(e,t,(function(){return s[t]}))}(n);e["default"]=o.a},4087:function(t,e,i){"use strict";var s;i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return s}));var o=function(){var t=this,e=t.$createElement,i=(t._self._c,t.$t("¥")),s=t.storeInfo.spec_type?t.$t("起"):null,o=t.storeInfo.vip_price&&t.storeInfo.vip_price>0&&1==t.storeInfo.is_vip&&1==t.svip_price_open?t.$t("¥"):null,n=t.storeInfo.limit_type>0&&1==t.storeInfo.limit_type?t.$t("单次限购"):null,r=t.storeInfo.limit_type>0&&1!=t.storeInfo.limit_type?t.$t("永久限购"):null,a=t.storeInfo.limit_type>0?t.$t(t.storeInfo.unit_name):null,c=t.$t("划线价"),u=t.$t("¥"),l=t.$t("库存"),h=t.$t(t.storeInfo.unit_name)||"",p=t.$t("销量"),d=t.$t(t.storeInfo.unit_name)||"",f=!t.is_money_level&&t.storeInfo.vip_price&&t.storeInfo.is_vip?t.$t("开通“超级会员”立省"):null,g=!t.is_money_level&&t.storeInfo.vip_price&&t.storeInfo.is_vip?t.$t("元"):null,m=!t.is_money_level&&t.storeInfo.vip_price&&t.storeInfo.is_vip?t.$t("立即开通"):null,$=t.storeInfo.presale?t.$t("预售活动时间"):null,v=t.storeInfo.presale?t.$t("预售结束后"):null,_=t.storeInfo.presale?t.$t("天内发货"):null,y=t.couponList.length?t.$t("优惠券"):null,S=t.couponList.length?t.__map(t.couponList,(function(e,i){var s=t.__get_orig(e),o=i<2?t.$t("满"):null,n=i<2?t.$t("减"):null;return{$orig:s,m19:o,m20:n}})):null,I=t.activity.length?t.$t("活动"):null,C=t.activity.length?t.__map(t.activity,(function(e,i){var s=t.__get_orig(e),o="1"===e.type?t.$t("参与秒杀"):null,n="2"===e.type?t.$t("参与砍价"):null,r="3"===e.type?t.$t("参与拼团"):null;return{$orig:s,m22:o,m23:n,m24:r}})):null,b=t.attr.productAttr.length&&t.skuArr.length>1?t.skuArr.slice(0,4):null,A=t.attr.productAttr.length&&t.skuArr.length>1?t.$t("共"):null,k=t.attr.productAttr.length&&t.skuArr.length>1?t.$t("种规格可选"):null,w=t.replyCount?t.$t("用户评价"):null,x=t.replyCount?t.$t("好评率"):null,T=t.good_list.length?t.$t("优品推荐"):null,P=t.good_list.length?t.__map(t.good_list,(function(e,i){var s=t.__get_orig(e),o=t.$t("¥"),n=t.__map(e.list,(function(e,i){var s=t.__get_orig(e),o=e.activity&&"1"===e.activity.type?t.$t("秒杀"):null,n=e.activity&&"2"===e.activity.type?t.$t("砍价"):null,r=e.activity&&"3"===e.activity.type?t.$t("拼团"):null;return{$orig:s,m30:o,m31:n,m32:r}}));return{$orig:s,m33:o,l3:n}})):null,L=t.$t("产品介绍"),V=t.$t("首页"),q=t.$t("收藏"),H=parseFloat(t.CartCount),M=t.$t("购物车"),O=t.noGoods?t.$t("暂无产品"):null,G=!t.noGoods&&!t.storeInfo.presale&&t.attr.productSelect.stock<=0&&t.storeInfo.cart_button?t.$t("加入购物车"):null,N=!t.noGoods&&!t.storeInfo.presale&&t.attr.productSelect.stock<=0?t.$t("已售罄"):null,R=t.noGoods||t.storeInfo.presale||t.attr.productSelect.stock<=0||!t.storeInfo.cart_button?null:t.$t("加入购物车"),j=t.noGoods||t.storeInfo.presale||t.attr.productSelect.stock<=0?null:t.$t("立即购买"),D=t.noGoods||!t.storeInfo.presale||1!==t.presale_pay_status&&3!==t.presale_pay_status||1!==t.presale_pay_status?null:t.$t("未开始"),U=t.noGoods||!t.storeInfo.presale||1!==t.presale_pay_status&&3!==t.presale_pay_status||1===t.presale_pay_status?null:t.$t("已结束"),B=!t.noGoods&&t.storeInfo.presale&&1!==t.presale_pay_status&&3!==t.presale_pay_status&&(t.attr.productSelect.quota<=0||t.attr.productSelect.quotat.length)&&(e=t.length);for(var i=0,s=new Array(e);i0?i.topArr[t]-T.globalData.navHeight/2:i.topArr[t])},scroll:function(t){var e=this,i=t.detail.scrollTop,s=i/200;if(s=s>1?1:s,e.$set(e,"opacity",s),e.$set(e,"scrollY",i),e.$set(e,"showAnimate",!1),e.$set(e,"showMenuIcon",!1),e.$set(e,"currentPage",!1),this.$refs.proSwiper.videoIsPause(),e.lock)e.$set(e,"lock",!1);else for(var o=0;oi&&(this.$set(this.attr.productSelect,"cart_num",i||1),this.$set(this,"cart_num",i||1))):(s.cart_num--,s.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"cart_num",1)))}},attrVal:function(t){this.$set(this.attr.productAttr[t.indexw],"index",this.attr.productAttr[t.indexw].attr_values[t.indexn])},ChangeAttr:function(t){var e=this,i=this.productValue[t];i?this.noGoods=!1:this.$util.Tips({title:this.$t("重新选择"),success:function(){e.noGoods=!0,e.attr.productSelect.stock=0,e.attr.productSelect.quota=0,e.attr.productSelect.cart_num=0}}),this.$set(this,"selectSku",i),i&&i.stock>0?(this.$set(this.attr.productSelect,"image",i.image),this.$set(this.attr.productSelect,"price",i.price),this.$set(this.attr.productSelect,"stock",i.stock),this.$set(this.attr.productSelect,"unique",i.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"vip_price",i.vip_price),this.$set(this,"attrValue",t),this.$set(this,"attrTxt",this.$t("已选择"))):(this.$set(this.attr.productSelect,"image",i.image),this.$set(this.attr.productSelect,"price",i.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price),this.$set(this,"attrValue",""),this.$set(this,"attrTxt",this.$t("请选择")))},ChangCoupons:function(t){var e=t,i=this.$util.ArrayRemove(this.couponList,"id",e.id);this.$set(this,"couponList",i),this.getCouponList()},setClientHeight:function(){var e=this;if(e.good_list.length){var i=t.createSelectorQuery().in(this).select("#list0");i.fields({size:!0},(function(t){e.$set(e,"clientHeight",t.height+20)})).exec()}},getGoodsDetails:function(){var e=this,i=this;t.showLoading({title:"加载中",mask:!0}),(0,s.getProductDetail)(i.id).then((function(s){t.hideLoading();for(var o=s.data.storeInfo,n=s.data.good_list||[],r=Math.ceil(n.length/6),a=new Array,c=0;c0){e=this.attr.productAttr.length?i.split(","):[];break}for(var s=0;s99?"...":i.CartCount+""),t&&(i.animated=!0,setTimeout((function(){i.animated=!1}),500))}))},goBuy:function(t){!1===this.isLogin?(0,a.toLogin)():(this.$refs.proSwiper.videoIsPause(),this.goCat(!0))},open:function(t){this.showMenuIcon=t},authColse:function(t){this.isShowAuth=t},listenerActionSheet:function(){if(this.currentPage=!1,!1===this.isLogin)(0,a.toLogin)();else{if(this.posterImage)return void(this.posters=!0);this.posters=!0}},listenerActionClose:function(){this.posters=!1,this.posterImageStatus=!1},posterImageClose:function(){this.posterImageStatus=!1},goFriend:function(){this.posters=!1},savePosterPath:function(){var e=this;t.getSetting({success:function(i){i.authSetting["scope.writePhotosAlbum"]?t.saveImageToPhotosAlbum({filePath:e.posterImage,success:function(t){e.posterImageClose(),e.$util.Tips({title:e.$t("保存成功"),icon:"success"})},fail:function(t){e.$util.Tips({title:e.$t("保存失败")})}}):t.authorize({scope:"scope.writePhotosAlbum",success:function(){t.saveImageToPhotosAlbum({filePath:e.posterImage,success:function(t){e.posterImageClose(),e.$util.Tips({title:e.$t("保存成功"),icon:"success"})},fail:function(t){e.$util.Tips({title:e.$t("保存失败")})}})}})}})},tabCouponType:function(t){this.$set(this.coupon,"type",t),this.getCouponList(t)},showImg:function(t){this.$refs.cusPreviewImg.open(this.selectSku.suk)},changeSwitch:function(t){var e=this.skuArr[t];this.$set(this,"selectSku",e);var i=e.suk.split(",");this.$set(this.attr.productAttr[0],"index",i[0]),2==i.length?(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1])):3==i.length?(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1]),this.$set(this.attr.productAttr[2],"index",i[2])):4==i.length&&(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1]),this.$set(this.attr.productAttr[2],"index",i[2]),this.$set(this.attr.productAttr[3],"index",i[3])),e&&(this.$set(this.attr.productSelect,"image",e.image),this.$set(this.attr.productSelect,"price",e.price),this.$set(this.attr.productSelect,"stock",e.stock),this.$set(this.attr.productSelect,"unique",e.unique),this.$set(this.attr.productSelect,"vipPrice",e.vipPrice),this.$set(this,"attrTxt",this.$t("已选择")),this.$set(this,"attrValue",e.suk))}}};e.default=V}).call(this,i("543d")["default"])},d055:function(t,e,i){"use strict";var s=i("99c6"),o=i.n(s);o.a}},[["4ad3","common/runtime","common/vendor"]]]);