(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods_details/index"],{"0f48":function(t,e,i){"use strict";(function(t){var s=i("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=s(i("448a")),n=i("1579"),r=i("8ba8"),a=i("d322"),c=i("451d"),u=i("666f"),l=i("26cb"),h=(i("94de"),s(i("cf40")),i("989b")),p=s(i("66ca")),d=i("190a"),f=t.getSystemInfoSync().statusBarHeight+"px",m=getApp(),g={components:{productConSwiper:function(){i.e("components/productConSwiper/index").then(function(){return resolve(i("16df"))}.bind(null,i)).catch(i.oe)},couponListWindow:function(){Promise.all([i.e("common/vendor"),i.e("components/couponListWindow/index")]).then(function(){return resolve(i("34ab"))}.bind(null,i)).catch(i.oe)},productWindow:function(){i.e("components/productWindow/index").then(function(){return resolve(i("e642"))}.bind(null,i)).catch(i.oe)},userEvaluation:function(){i.e("components/userEvaluation/index").then(function(){return resolve(i("7fe0"))}.bind(null,i)).catch(i.oe)},shareRedPackets:function(){i.e("components/shareRedPackets/index").then(function(){return resolve(i("9990"))}.bind(null,i)).catch(i.oe)},kefuIcon:function(){Promise.all([i.e("common/vendor"),i.e("components/kefuIcon/index")]).then(function(){return resolve(i("d4f6"))}.bind(null,i)).catch(i.oe)},menuIcon:function(){i.e("components/menuIcon").then(function(){return resolve(i("9099"))}.bind(null,i)).catch(i.oe)},cusPreviewImg:function(){i.e("components/cusPreviewImg/index").then(function(){return resolve(i("b858"))}.bind(null,i)).catch(i.oe)},swiperPrevie:function(){i.e("components/cusPreviewImg/swiperPrevie").then(function(){return resolve(i("253a"))}.bind(null,i)).catch(i.oe)},authorize:function(){i.e("components/Authorize").then(function(){return resolve(i("b29f"))}.bind(null,i)).catch(i.oe)},parser:function(){Promise.all([i.e("common/vendor"),i.e("components/jyf-parser/jyf-parser")]).then(function(){return resolve(i("dce2"))}.bind(null,i)).catch(i.oe)},homeList:function(){i.e("components/homeList/index").then(function(){return resolve(i("e4d5"))}.bind(null,i)).catch(i.oe)}},directives:{trigger:{inserted:function(t,e){t.click()}}},mixins:[p.default,d.sharePoster],data:function(){return{imgHost:h.HTTP_REQUEST_URL,sysHeight:f,noGoods:!1,showSkeleton:!0,isNodes:0,Active:!1,presale_pay_status:1,coupon:{coupon:!1,type:-1,list:[],count:[]},showAnimate:!1,showMenuIcon:!1,attrTxt:this.$t("请选择"),attrValue:"",animated:!1,id:0,replyCount:0,reply:[],storeInfo:{},productValue:[],couponList:[],cart_num:1,isAuto:!1,isShowAuth:!1,isOpen:!1,actionSheetHidden:!0,posterImageStatus:!1,storeImage:"",PromotionCode:"",canvasStatus:!1,posterImage:"",posterbackgd:"/static/images/posterbackgd.png",sharePacket:{isState:!0},uid:0,circular:!1,autoplay:!1,interval:3e3,duration:500,clientHeight:"",systemStore:{},good_list:[],replyChance:0,CartCount:0,isDown:!0,storeSelfMention:!0,posters:!1,weixinStatus:!1,attr:{cartAttr:!1,productAttr:[],productSelect:{}},description:"",navActive:0,H5ShareBox:!1,activity:[],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%;height:100%;"},returnShow:!0,diff:"",is_money_level:1,is_vip:0,navbarRight:0,homeTop:20,routineContact:0,skuArr:[],selectSku:{},currentPage:!1,svip_price_open:1}},computed:(0,l.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,e){1==t&&(this.getCouponList(),this.getCartCount(),this.downloadFilePromotionCode())},deep:!0},storeInfo:{handler:function(){this.$nextTick((function(){}))},immediate:!0}},onLoad:function(e){var i=this,s=getCurrentPages();if(i.returnShow=1!==s.length,i.navH=m.globalData.navHeight,i.id=e.id,t.getSystemInfo({success:function(e){i.height=e.windowHeight,i.navbarRight=e.windowWidth-t.getMenuButtonBoundingClientRect().left}}),e.scene){var o=i.$util.getUrlParams(decodeURIComponent(e.scene));o.id&&(e.id=o.id),o.pid&&(m.globalData.spid=o.pid)}if(!e.id)return this.showSkeleton=!1,i.$util.Tips({title:i.$t("缺少参数无法查看商品")},{tab:3,url:1});i.id=e.id,i.getGoodsDetails()},onReady:function(){this.isNodes++,this.$nextTick((function(){var e=this,i=t.getMenuButtonBoundingClientRect(),s=t.createSelectorQuery().in(this);s.select("#home").boundingClientRect((function(t){e.homeTop=2*i.top+i.height-t.height||0})).exec()}))},onShareAppMessage:function(){return this.$set(this,"actionSheetHidden",!this.actionSheetHidden),(0,r.userShare)(),{title:this.storeInfo.store_name||"",imageUrl:this.storeInfo.image||"",path:"/pages/goods_details/index?id="+this.id+"&spid="+this.uid}},onShareTimeline:function(){return(0,r.userShare)(),{title:this.storeInfo.store_name,query:{id:this.id,spid:this.uid||0},imageUrl:this.storeInfo.image}},onNavigationBarButtonTap:function(t){this.currentPage=!this.currentPage},methods:{moreNav:function(){this.currentPage=!this.currentPage},jumpUrl:function(e){t.switchTab({url:e})},videoPause:function(){this.$nextTick((function(){that.infoScroll()}))},qrR:function(t){},closeChange:function(){this.$set(this.sharePacket,"isState",!0)},boxStatus:function(t){this.showAnimate=t},goActivity:function(e){var i=e;"1"===i.type?t.navigateTo({url:"/pages/activity/goods_seckill_details/index?id=".concat(i.id,"&time=").concat(i.time,"&status=1")}):"2"===i.type?t.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(i.id,"&bargain=").concat(this.uid)}):t.navigateTo({url:"/pages/activity/goods_combination_details/index?id=".concat(i.id)})},iptCartNum:function(t){var e=this;if(t){var i=this.storeInfo.min_qty;Number.isInteger(parseInt(t))&&parseInt(t)>=this.storeInfo.min_qty&&(i=parseInt(t)),this.$nextTick((function(t){e.$set(e.attr.productSelect,"cart_num",t<0?e.storeInfo.min_qty:i)}))}},returns:function(){return t.navigateBack({delta:1})},tap:function(t){var e="past"+t;t=t;this.$set(this,"toView",e),this.$set(this,"navActive",t),this.$set(this,"lock",!0),this.$set(this,"scrollTop",t>0?this.topArr[t]-m.globalData.navHeight/2:this.topArr[t])},scroll:function(t){var e=t.detail.scrollTop,i=e/200;if(i=i>1?1:i,this.$set(this,"opacity",i),this.$set(this,"scrollY",e),this.$set(this,"showAnimate",!1),this.$set(this,"showMenuIcon",!1),this.$set(this,"currentPage",!1),this.$refs.proSwiper.videoIsPause(),this.lock)this.$set(this,"lock",!1);else for(var s=0;s=this.storeInfo.limit_num&&t||(t?(s.cart_num++,s.cart_num>i&&(this.$set(this.attr.productSelect,"cart_num",i||this.storeInfo.min_qty),this.$set(this,"cart_num",i||1))):(s.cart_num--,s.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",this.storeInfo.min_qty),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",this.storeInfo.min_qty),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,n.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,u.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,this.downloadFilePromotionCode(),!1===this.isLogin)(0,u.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)},showSwiperImg:function(t){this.$refs.cusSwiperImg.open(t)},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=g}).call(this,i("543d")["default"])},"227b":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(){}));var s=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.storeInfo.limit_type>0&&t.storeInfo.min_qty>1?t.$t("起购"):null,u=t.$t("划线价"),l=t.$t("¥"),h=t.$t("库存"),p=t.$t(t.storeInfo.unit_name)||"",d=t.$t("销量"),f=t.$t(t.storeInfo.unit_name)||"",m=!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,$=!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,y=t.storeInfo.presale?t.$t("天内发货"):null,S=t.couponList.length,I=S?t.$t("优惠券"):null,C=S?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,m20:o,m21:n}})):null,b=t.activity.length,A=b?t.$t("活动"):null,k=b?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,m23:o,m24:n,m25:r}})):null,w=t.attr.productAttr.length,x=w?t.skuArr.length:null,P=w&&x>1?t.skuArr.slice(0,4):null,T=w&&x>1?t.$t("共"):null,L=w&&x>1?t.skuArr.length:null,q=w&&x>1?t.$t("种规格可选"):null,V=t.replyCount?t.$t("用户评价"):null,H=t.replyCount?t.$t("好评率"):null,N=t.good_list.length,G=N?t.$t("优品推荐"):null,O=N?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,m31:o,m32:n,m33:r}}));return{$orig:s,m34:o,l3:n}})):null,M=t.$t("产品介绍"),R=t.$t("首页"),D=t.$t("收藏"),U=parseFloat(t.CartCount),B=t.$t("购物车"),j=t.noGoods?t.$t("暂无产品"):null,F=!t.noGoods&&!t.storeInfo.presale&&t.attr.productSelect.stock<=0&&t.storeInfo.cart_button?t.$t("加入购物车"):null,E=!t.noGoods&&!t.storeInfo.presale&&t.attr.productSelect.stock<=0?t.$t("已售罄"):null,W=t.noGoods||t.storeInfo.presale||t.attr.productSelect.stock<=0||!t.storeInfo.cart_button?null:t.$t("加入购物车"),z=t.noGoods||t.storeInfo.presale||t.attr.productSelect.stock<=0?null:t.$t("立即购买"),Q=t.noGoods||!t.storeInfo.presale||1!==t.presale_pay_status&&3!==t.presale_pay_status||1!==t.presale_pay_status?null:t.$t("未开始"),J=t.noGoods||!t.storeInfo.presale||1!==t.presale_pay_status&&3!==t.presale_pay_status||1===t.presale_pay_status?null:t.$t("已结束"),Y=!t.noGoods&&t.storeInfo.presale&&1!==t.presale_pay_status&&3!==t.presale_pay_status&&(t.attr.productSelect.quota<=0||t.attr.productSelect.quota