(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-8230c014","chunk-2e18f680"],{1160:function(t,e,i){"use strict";i("96f7")},3288:function(t,e,i){},"412f":function(t,e,i){"use strict";i.r(e),i("433b");var s=i("d399"),a=(i("14d9"),i("d7a6")),o=i("ae31"),l=i("1f4f"),n=i("e982"),c=i("696e"),r={props:["allGoodsDatas","tipDatas","pcBundleBgImgUrl"],data:()=>({productCode:"",productDetail:"",limit:"",pageSetData:"",showPriceRange:!0,goPdpUrl:"",skuCode:"",showMultiSelect:!1}),components:{multiSelect:n.default},computed:{...Object(a.mapState)("common",{userInfo:t=>t.userInfo,myInformation:t=>t.myInformation,WarehouseCode:t=>t.WarehouseCode,scoreQualification:t=>t.scoreQualification,isFOA:t=>t.isFOA,isLogin:t=>t.isLogin,deliveryMethod:t=>t.deliveryMethod,checkStoreCode:t=>t.checkStoreCode,orderType:t=>t.orderType,authByScoreData:t=>t.authByScoreData,scoreData:t=>t.scoreData})},filters:{million:function(t){return t>9999?(t/1e3/10).toFixed(1)+"万":t}},methods:{productDetailUrl(t){this.$router.push("/productDetail?skuCode="+t)},async getcart(t){const{skuCode:e,skuCodes:i,stockout:a}=t;if("MIXOLOGISTIC"===t.combinedType)return void this.$router.push("/productDetail?skuCode="+e);if(a)return;if(i&&i.length>1)return this.showMultiSelect=!0,void(this.skuCode=e);const{productDetailDTO:{skuList:n}}=await Object(c.b)({data:{skuCode:e,force2Parent:!0}});if(n&&n.length>1)return this.showMultiSelect=!0,void(this.skuCode=e);const r=Object(o.b)({skuCode:e},!0,!0);r&&r.then(t=>{t.success?Object(s.a)("加入购物车成功"):Object(l.D)(t,!1)})},landingScroll(){this.scroll=document.getElementById("all-goods").scrollTop;const t=window.innerHeight;!function(){for(let e=0;e<document.getElementsByClassName("good-item").length;e++)document.getElementsByClassName("good-item")[e].getBoundingClientRect().top<t&&(document.getElementsByClassName("good-item")[e].className="good-item active")}()},goAllProducts(t){this.$emit("goAllProducts",t)}}},d=(i("7e76"),i("2877")),u=Object(d.a)(r,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"landing-all-goods",style:{backgroundImage:"url("+t.pcBundleBgImgUrl+")"}},[t._l(t.allGoodsDatas.bundleDatas,(function(i,s){return e("div",{key:s,staticClass:"all-goods",style:{backgroundImage:"url("+i.pcBundleContentImgUrl+")"},attrs:{id:"products-content"}},[e("div",{staticClass:"goods-content"},t._l(i.productDetails,(function(i,s){return e("div",{key:s,staticClass:"good-item"},[e("product-pic",{staticClass:"good-img",attrs:{src:i.picture,"frame-url":i.productFrameUrl,"show-min-height":!1},on:{click:function(e){return t.productDetailUrl(i.skuCode)}}},[e("product-label",{attrs:{"stock-info":i.stockDTO,size:"mini"}})],1),e("div",{staticClass:"good-detail"},[e("div",{staticClass:"good-title",on:{click:function(e){return t.productDetailUrl(i.skuCode)}}},[t._v(t._s(i.productName))]),i.priceDTO?e("div",{staticClass:"good-price"},[e("div",{staticClass:"price"},[t._v(t._s(i.priceDTO.value))])]):t._e(),e("div",{staticClass:"good-cart"},[e("div",{staticClass:"month-sale"},[t._v("月销 "+t._s(t._f("million")(i.saleCnt))+t._s(i.unitName))]),e("div",{staticClass:"icon-cart iconal icon-gouwuche",class:i.stockout?"undisable":"",attrs:{id:t.$putAsh(i.stockDTO),"data-isPrice":i.isVariantOptions?"true":"false"},on:{click:function(e){return t.getcart(i,e)}}})])])],1)})),0)])})),e("div",{staticClass:"see-other-products"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.tipDatas[0].pcTipsContentImageUrl,expression:"tipDatas[0].pcTipsContentImageUrl"}],staticClass:"bottom-bcg",attrs:{alt:"底部图片"}}),e("div",{staticClass:"tips"},[t._v(t._s(t.tipDatas[0].activityTipsNotes))]),t.tipDatas[0].pcTipsBtnImageUrl&&"null"!=t.tipDatas[0].pcTipsBtnImageUrl?e("a",{staticClass:"all-products",on:{click:function(e){return t.goAllProducts(t.tipDatas[0].pcActivityTipsUrl)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.tipDatas[0].pcTipsBtnImageUrl,expression:"tipDatas[0].pcTipsBtnImageUrl"}],attrs:{alt:"全部商品按钮"}})]):t._e()]),t.showMultiSelect?e("multiSelect",{attrs:{skuCodeFromParent:t.skuCode}}):t._e()],2)}),[],!1,null,"d5507cf8",null);e.default=u.exports},"6cfa":function(t,e,i){"use strict";i.r(e),i("14d9");var s=i("ae31"),a=i("d7a6"),o=i("696e"),l=i("75cc"),n={mixins:[i("bbc1").a],props:["bundleDatas","tipDatas","TabName","pcBundleBgImgUrl","bannerDatas","productsMarginTop","productsPaddingTop","activeTab","multipleTabIndex","name"],data:()=>({isSeeSingleItem:!1,oneAddCartData:"",batchAddResult:"",bundlePrice:"",isBatchAddCartResult:!1,combinationDatas:"",pageSetData:"",productCode:"",productList:[],shareIndex:0,groupIndex:0}),computed:{...Object(a.mapState)("landing",["products","landingPageCode","isFixed"]),...Object(a.mapState)("common",{isLogin:t=>t.isLogin,userInfo:t=>t.userInfo,myInformation:t=>t.myInformation,checkStoreCode:t=>t.checkStoreCode,isFOA:t=>t.isFOA,orderType:t=>t.orderType})},methods:{seeProducts(t,e){this.productCode=t.productItemDatas,this.bundlePrice=Number(t.bundlePrice),this.isSeeSingleItem=!0,this.ZhuGeclickEvent("云购_点击查看单品_活动商品聚合页",e,t.name)},ZhuGeclickEvent(t,e,i){window.trackZhuge.clickEvent({"事件名称":t,"事件类型":"点击事件","事件详情":i||"商品组合","活动名称":document.title||this.name,"所在Tab":this.TabName,"行为类型":"点击","商品组合名称":"undefined"!=e&&this.combinationDatas.length&&this.combinationDatas[e]?this.combinationDatas[e].name:"","行为对象":"按钮","页面名称":document.title})},async addCartClickEvent(t){const e=[];t.map(t=>{e.push(t.skuCode)});const i=await Object(o.d)({data:{skuCodes:e,onlySearchable:!1,defaultSku:!1},loading:!0});i.success&&(t.map(t=>{i.data.products.content.forEach(e=>{t.skuCode==e.skuCode&&(t.price=e.priceList[0].price,t.skuName=e.skuName,t.series=e.categoryPathList.length?e.categoryPathList[0][e.categoryPathList[0].length-1].name:"")})}),t.map(t=>{window.trackZhuge.clickEvent({"页面名称":document.title,"事件名称":"云购_加入购物车","事件类型":"商品加购","商品ID":t.skuCode,"加购数量":t.quantity,"兑换方式":"无","页面类型":"活动商品聚合页","单价":t.price?t.price:"无","商品产品线":"无","商品系列":t.series,"商品名称":t.skuName||"无"})}))},shareCombination(t,e){this.ZhuGeclickEvent("云购_点击分享_活动商品聚合页",e,t.name);const i=this.bannerDatas[0].shareImgList.length>0?this.bannerDatas[0].shareImgList[0][this.shareIndex]:t.shareImgCombination;this.shareIndex=e,this.groupIndex="banner"!=this.combinationDatas[0].name?e:e-1;const{path:s,query:{activityCode:a}}=this.$route;let o=`${s}?activityCode=${a}`;this.activeTab>=0&&(o+="&tabIndex="+this.activeTab),this.groupIndex>=0&&(o+="&groupIndex="+this.groupIndex),this.multipleTabIndex>=0&&(o+="&multipleTabIndex="+this.multipleTabIndex),this.setShareFullBgShareMixin({url:o,title:"",goodsImg:i,isTransparent:!0,pageTitle:"商品",activityName:(null==t?void 0:t.name)||"",activityID:(null==t?void 0:t.code)||""})},async oneAddCart(t,e,i){this.ZhuGeclickEvent("云购_点击一键加购_活动商品聚合页",e,i);const a={orderType:this.orderType,loginAda:this.myInformation.ada,type:0,realWarehouseCode:this.checkStoreCode,consigneeAda:this.userInfo.ada,consigneeType:this.userInfo.type,consigneeMemberType:this.userInfo.memberType,loginMemberType:this.myInformation.memberType,loginType:this.myInformation.type,products:t,aplusFlag:this.myInformation.isAplus},o=await Object(l.c)({data:a,loading:!0,hideMsg:!0});await Object(s.s)(),this.batchAddResult=o.data,this.productList=t,this.isBatchAddCartResult=!0,"0"!==o.code&&(this.batchAddResult.fail=!0);const n=[],c=[];o.data.errMessageList&&o.data.errMessageList.length&&(o.data.errMessageList.map(t=>{n.push(t.skuCode)}),this.productList.map(t=>{n.includes(t.skuCode)||c.push(t)})),c.length?this.addCartClickEvent(c):this.addCartClickEvent(this.productList)},goAllProducts(t){window.trackZhuge.clickEvent({"事件类型":"点击事件","事件详情":"无","活动名称":document.title||this.name,"行为类型":"点击","行为对象":"按钮","页面名称":document.title,"事件名称":"云购_点击全部商品_活动商品聚合页"}),this.$emit("goAllProducts",t)},landingScroll(){this.scroll=document.getElementById("products-content").scrollTop;const t=window.innerHeight;!function(){for(let e=0;e<document.getElementsByClassName("products-item").length;e++)document.getElementsByClassName("products-item")[e].getBoundingClientRect().top<t&&(document.getElementsByClassName("products-item")[e].className="products-item active")}()}},components:{seeSingleItemPop:()=>i.e("seeSingleItemPop").then(i.bind(null,"3741")),batchAddCartResult:()=>i.e("batchAddCartResult").then(i.bind(null,"9311"))},watch:{bundleDatas:{handler(t){this.combinationDatas=t},immediate:!0,deep:!0}}},c=(i("cb1c"),i("2877")),r=Object(c.a)(n,(function(){var t=this,e=t._self._c;return t.combinationDatas?e("div",{staticClass:"landing-products",style:{backgroundImage:"url("+t.pcBundleBgImgUrl+")",paddingTop:t.isFixed?"0":".475rem"}},[e("div",{staticClass:"products-content",style:{marginTop:t.productsMarginTop,paddingTop:t.productsPaddingTop},attrs:{id:"products-content"}},[t._l(t.combinationDatas,(function(i,s){return e("div",{key:s,staticClass:"products-item"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.$getResizeImgUrl(i.pcBundleContentImgUrl,{resizeWidth:1600}),expression:"$getResizeImgUrl(item.pcBundleContentImgUrl, { resizeWidth: 1600 })"}],staticClass:"products-img",attrs:{alt:""}}),"null"!=i.pcBundleShareBtnImgUrl?e("div",{staticClass:"qrcode",on:{click:function(e){return t.shareCombination(i,s)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.$getResizeImgUrl(i.pcBundleShareBtnImgUrl,{resizeWidth:60}),expression:"$getResizeImgUrl(item.pcBundleShareBtnImgUrl, { resizeWidth: 60 })"}],attrs:{alt:""}})]):t._e(),e("div",{staticClass:"productBtn"},["null"!==i.pcBundleBnt2ImgUrl?e("div",{ref:"seeProducts",refInFor:!0,staticClass:"see-products",on:{click:function(e){return t.seeProducts(i,s)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.$getResizeImgUrl(i.pcBundleBnt2ImgUrl,{resizeWidth:160}),expression:"$getResizeImgUrl(item.pcBundleBnt2ImgUrl, { resizeWidth: 160 })"}],attrs:{alt:""}})]):t._e(),"null"!==i.pcBundleBnt1ImgUrl?e("div",{staticClass:"add-purchase",on:{click:function(e){return t.oneAddCart(i.productItemDatas,s,i.name)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.$getResizeImgUrl(i.pcBundleBnt1ImgUrl,{resizeWidth:160}),expression:"$getResizeImgUrl(item.pcBundleBnt1ImgUrl, { resizeWidth: 160 })"}],attrs:{alt:""}})]):t._e()])])})),t.tipDatas&&t.tipDatas[0].pcTipsContentImageUrl&&"null"!=t.tipDatas[0].pcTipsContentImageUrl?e("div",{staticClass:"see-other-products"},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.tipDatas[0].pcTipsContentImageUrl,expression:"tipDatas[0].pcTipsContentImageUrl"}],staticClass:"bottom-bcg",attrs:{alt:"底部图片"}}),e("div",{staticClass:"tips"},[t._v(t._s(t.tipDatas[0].activityTipsNotes))]),t.tipDatas[0].pcTipsBtnImageUrl&&"null"!=t.tipDatas[0].pcTipsBtnImageUrl?e("a",{staticClass:"all-products",attrs:{href:"javascript:;"},on:{click:function(e){return t.goAllProducts(t.tipDatas[0].pcActivityTipsUrl)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.tipDatas[0].pcTipsBtnImageUrl,expression:"tipDatas[0].pcTipsBtnImageUrl"}],attrs:{alt:"全部商品按钮"}})]):t._e()]):t._e()],2),t.isSeeSingleItem?e("seeSingleItemPop",{attrs:{productCode:t.productCode,bundlePrice:t.bundlePrice},on:{oneAddCart:t.oneAddCart}}):t._e(),t.batchAddResult&&t.isBatchAddCartResult?e("batchAddCartResult",{attrs:{productList:t.productList,batchAddResult:t.batchAddResult}}):t._e(),t.visible?e("global-share",{ref:"globalShareRef",attrs:{"share-control-info":t.shareControlInfo,"share-params":t.shareParams,options:t.options,closeable:"",visible:t.visible,"buried-code-setting":t.buriedCodeSetting},on:{close:t.closeFullBgShareMixin}}):t._e()],1):t._e()}),[],!1,null,"d8c2bab8",null);e.default=r.exports},"7e76":function(t,e,i){"use strict";i("e1ba")},9585:function(t,e,i){},"96f7":function(t,e,i){},a3c5:function(t,e,i){"use strict";i.r(e),i("14d9");var s=i("d7a6"),a=i("412f"),o=i("6cfa"),l=i("696e"),n={props:["tabDatas","pcTabBgImageUrl","bannerDatas","multipleTabIndex","name"],data:()=>({TabName:"",isTabDown:!1,offsetTop:0,isFixed:!1,isBottom:!1,activeTab:0,bundleDatas:"",isCombination:!0,tipDatas:"",residueData:"",allGoodsDatas:"",pcBundleBgImgUrl:"",userInfo:"",time:3,productsMarginTop:"",productsPaddingTop:"",inGroupLanding:!1,sortMap:{"销量":"SALE_COUNT","上架时间":"SALE_TIME"}}),components:{AllGoods:a.default,Combination:o.default},async created(){if(this.tabDatas.length>0){let t="";this.tabDatas.map(e=>{e.redirectInfos&&e.redirectInfos.map(e=>{"H5"==e.redirectChannel&&(t=e.redirectUrl)}),t&&e.tipDatas.length>0&&e.tipDatas.map(e=>{e.pcActivityTipsUrl=t})})}if(this.bundleDatas=this.tabDatas[0].bundleDatas,this.TabName=this.tabDatas[0].name,this.pcBundleBgImgUrl=this.tabDatas[0].pcBundleBgImgUrl,this.productsPaddingTop=this.tabDatas[0].productsPaddingTop,this.productsMarginTop=this.tabDatas[0].productsMarginTop,this.tipDatas=this.tabDatas[0].tipDatas,this.tabDatas.length>6){this.residueData=this.tabDatas.slice(6);for(let t=0;t<6;t++)this.residueData.unshift(" ")}if("all"===this.tabDatas[0].bundleDatas[0].bundleType){this.isCombination=!1;const t=this.tabDatas[0];t.bundleDatas.map(t=>{t.productCode=[],t.productDatas.map(e=>{t.productCode.push(e.skuCode)})});const e=[];for(let i=0;i<t.bundleDatas.length;i++)e.push(new Promise(e=>{e(this.searchProduct(t.bundleDatas[i]))}));Promise.all(e).then(e=>{e.map((e,i)=>{t.bundleDatas[i].productDetails=this.getPriceArr(e)})}).then(()=>{this.allGoodsDatas=t})}else this.isCombination=!0},mounted(){window.addEventListener("scroll",this.initHeight),this.$route.path.indexOf("group-landing")>-1&&(this.inGroupLanding=!0)},destroyed(){},methods:{...Object(s.mapMutations)("landing",["updateTabBarBcg","updataIsFixed"]),getPriceArr(t){return t.map(t=>{let e;e=t.skuCodes.length>1&&t.loadingPriceList&&t.loadingPriceList.length>0?t.loadingPriceList:t.priceList;const i=e.length;t.priceList=e,t.priceAll={};const s=t.priceList.findIndex(t=>t.giftPoint&&t.giftPoint>0);t.priceAll.hasGiftPoint=s,1===i?(t.priceList[0].price&&!t.priceList[0].giftPoint&&(t.priceAll.type=1,t.priceAll.title="",t.priceAll.value="￥"+t.priceList[0].price),!t.priceList[0].price&&t.priceList[0].giftPoint&&(t.priceAll.type=1,t.priceAll.title="悦享分",t.priceAll.value=t.priceList[0].giftPoint),t.priceList[0].price&&t.priceList[0].giftPoint&&(t.priceAll.type=1,t.priceAll.title="悦享分+现金",t.priceAll.value=`${t.priceList[0].giftPoint}+￥${t.priceList[0].price}`)):0===i?(t.priceAll.type=1,t.priceAll.title="",t.priceAll.value=t.commonAttributes||"sop价格"):!t.priceList.length||t.priceList[0].giftPoint||t.priceList[t.priceList.length-1].giftPoint?(t.priceAll={type:2,single:{title:"悦享分",value:[]},some:{title:"悦享分+现金",value:[]}},t.priceList.map(e=>{!e.price&&e.giftPoint&&t.priceAll.single.value.push(e.giftPoint),e.price&&e.giftPoint&&t.priceAll.some.value.push(`${e.giftPoint}+￥${e.price}`)})):(t.priceAll.type=1,t.priceAll.title="",t.priceList[0].price!=t.priceList[t.priceList.length-1].price?t.priceAll.value=`￥${t.priceList[0].price}~￥${t.priceList[t.priceList.length-1].price}`:t.priceAll.value="￥"+t.priceList[0].price),t.tagsAll={};const a=t.tagList;if(null!==a&&a.length){t.tagsAll.enshrine=a.some(t=>"QUOTA"===t.tagCode||"FLASH_SALE"===t.tagCode),t.tagsAll.ration=a.some(t=>"QUOTA"===t.tagCode);const e=a.filter(t=>this.$isAoProduct(t.tagCode)),i=a.filter(t=>"LOW_STOCK"===t.tagCode);0!=e.length&&0!=i.length?e[0].priority>i[0].priority?(t.tagsAll.reserve=!0,t.tagsAll.inventoryLack=!1):(t.tagsAll.inventoryLack=!0,t.tagsAll.reserve=!1):(t.tagsAll.reserve=0!=e.length,t.tagsAll.inventoryLack=0!=i.length)}else t.tagsAll.enshrine=!1,t.tagsAll.reserve=!1,t.tagsAll.inventoryLack=!1,t.tagsAll.sop=!1;t.tagsAll.sop="ARTISTRY_SOP"===t.virtualProductType||"NUTRILITE_SOP"===t.virtualProductType||"ProbioticSOP"===t.virtualProductType,t.tagsAll.conversion="COFFEE_COUPON"===t.virtualProductType||"AMPLUS_COUPON"===t.virtualProductType||"CHARITY"===t.virtualProductType}),t},openTabDown(){this.isTabDown=!this.isTabDown},initHeight(){document.querySelector(".banner-content")&&(this.offsetTop=document.querySelector(".banner-content").offsetHeight),(document.documentElement.scrollTop||document.body.scrollTop)>this.offsetTop?this.isFixed=!0:this.isFixed=!1},goTabIndex(){if(!this.isFixed||"LandingTab1_1"===this.activeTab)return!1;this.selectTab(0,this.tabDatas[0])},async searchProduct(t){const e=this.sortMap[t.productSort]||"",{data:{products:{content:i}}}=await Object(l.d)({data:{skuCodes:t.productCode,onlySearchable:!1,defaultSku:!1,sortProperty:e,sortType:e?"desc":void 0,pageSize:100,pageNo:1},loading:!0});return i||[]},selectTab(t,e){const i=document.getElementById("landing");if(i.scrollTop>"600"){const t=this,e=setInterval(()=>{const s=Math.floor(-t.scrollTop/5);i.scrollTop=t.scrollTop+s,0===i.scrollTop&&clearInterval(e)},16)}if(this.activeTab===t)return!1;if(this.activeTab=t,"combination"===e.tabType)this.isCombination=!0,this.bundleDatas=e.bundleDatas,this.TabName=e.name,this.tipDatas=e.tipDatas;else if(this.tipDatas=e.tipDatas,this.isCombination=!1,"all"===e.tabType){const t=e;t.bundleDatas.map(t=>{t.productCode=[],t.productDatas.map(e=>{t.productCode.push(e.skuCode)})});const i=[];for(let e=0;e<t.bundleDatas.length;e++)i.push(new Promise(i=>{i(this.searchProduct(t.bundleDatas[e]))}));Promise.all(i).then(e=>{e.map((e,i)=>{t.bundleDatas[i].productDetails=this.getPriceArr(e)})}).then(()=>{this.allGoodsDatas=t})}window.trackZhuge.clickEvent({"事件类型":"点击事件","事件详情":e.name,"页面名称":document.title,"行为类型":"点击","行为对象":"按钮","活动名称":document.title,"事件名称":"云购_点击分类tab_活动商品聚合页"})},goAllProducts(t){const e=this.tabDatas.findIndex(e=>e.code===t);if(e>=0)return this.selectTab(e,this.tabDatas[e]);window.location.href=t}},computed:{...Object(s.mapState)("common",{orderType:t=>t.orderType,channel:t=>t.channel})}},c=(i("1160"),i("2877")),r=Object(c.a)(n,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"landing-tabcontent"},["null"!==t.pcTabBgImageUrl?e("div",{staticClass:"tab-content",class:{is_fixed:t.isFixed&&!t.inGroupLanding},style:{backgroundImage:"url("+t.pcTabBgImageUrl+")"},attrs:{id:"tabContent"}},[e("div",{staticClass:"tab-middle"},[e("div",{staticClass:"tab-left",on:{click:function(e){return t.goTabIndex()}}}),e("div",{staticClass:"tab-center"},[e("div",{staticClass:"tab-box"},t._l(t.tabDatas.slice(0,6),(function(i,s){return e("div",{key:s,staticClass:"tab-item",class:t.activeTab===s?"active":"",on:{click:function(e){return t.selectTab(s,i)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.activeTab===s?i.pcTabCheckedBtnImgUrl:i.pcTabBtnImgUrl,expression:"activeTab === index ? item.pcTabCheckedBtnImgUrl : item.pcTabBtnImgUrl"}],staticClass:"img-tab",attrs:{alt:""}})])})),0)]),e("div",{directives:[{name:"show",rawName:"v-show",value:t.tabDatas.length>6,expression:"tabDatas.length > 6"}],staticClass:"tab-right"},[e("div",{staticClass:"tab-drop-down",on:{click:t.openTabDown}},[e("span",[t._v("更多")]),e("i",{directives:[{name:"show",rawName:"v-show",value:!t.isTabDown,expression:"!isTabDown"}],staticClass:"iconal icon-arrow-down"}),e("i",{directives:[{name:"show",rawName:"v-show",value:t.isTabDown,expression:"isTabDown"}],staticClass:"iconal icon-arrow-up"})])]),t.isTabDown?e("div",{staticClass:"tab-down"},[e("div",{staticClass:"tab-down-center"},t._l(t.residueData,(function(i,s){return e("div",{directives:[{name:"show",rawName:"v-show",value:i.pcBundleBgImgUrl,expression:"item.pcBundleBgImgUrl"}],key:s,staticClass:"down-item",on:{click:function(e){return t.selectTab(s,i)}}},[e("img",{directives:[{name:"lazy",rawName:"v-lazy",value:t.activeTab===s?i.pcTabCheckedBtnImgUrl:i.pcTabBtnImgUrl,expression:"activeTab === index ? item.pcTabCheckedBtnImgUrl : item.pcTabBtnImgUrl"}],staticClass:"img-tab",attrs:{alt:""}})])})),0)]):t._e()])]):t._e(),t.isCombination?e("Combination",{attrs:{TabName:t.TabName,bundleDatas:t.bundleDatas,tipDatas:t.tipDatas,activeTab:t.activeTab,pcBundleBgImgUrl:t.pcBundleBgImgUrl,productsMarginTop:t.productsMarginTop,productsPaddingTop:t.productsPaddingTop,bannerDatas:t.bannerDatas,multipleTabIndex:t.multipleTabIndex,name:t.name},on:{goAllProducts:t.goAllProducts}}):t._e(),t.isCombination?t._e():e("AllGoods",{attrs:{tipDatas:t.tipDatas,allGoodsDatas:t.allGoodsDatas,pcBundleBgImgUrl:t.pcBundleBgImgUrl},on:{goAllProducts:t.goAllProducts}})],1)}),[],!1,null,"560d63ef",null);e.default=r.exports},a4ed:function(t,e,i){},bbc1:function(t,e,i){"use strict";i("14d9"),e.a={data:()=>({visible:!1,options:{hiddenSetting:{sharer:{}},module:"fullBg"},buriedCodeSetting:{},shareParams:{},shareControlInfo:{},fullBgShareMixinParams:{}}),computed:{goodShareMixinSubtitle(){var t;let e="";const i=null===(t=this.fullBgShareMixinParams)||void 0===t?void 0:t.product;var s;return i&&(e=null===(s=i.commonAttributes)||void 0===s?void 0:s.sales_terminology),e},goodShareMixinMainTitle(){var t;let e="";const i=null===(t=this.fullBgShareMixinParams)||void 0===t?void 0:t.product;return i&&(e=i.skuName),e},goodShareMixinGoodUrl(){var t;let e="";const i=null===(t=this.fullBgShareMixinParams)||void 0===t?void 0:t.product;return i&&(e=i.picture),e}},methods:{setShareFullBgShareMixin(t){if(!this.$store.state.common.isLogin)return window.localStorage.setItem("loginBackUrl",this.$route.fullPath),void this.$router.push({path:"/login"}).then();this.fullBgShareMixinParams=t,this.shareParams={url:(null==t?void 0:t.url)||this.$route.fullPath},this.shareControlInfo={title:(null==t?void 0:t.title)||this.goodShareMixinMainTitle,subtitle:(null==t?void 0:t.subtitle)||this.goodShareMixinSubtitle,goodsImg:(null==t?void 0:t.goodsImg)||this.goodShareMixinGoodUrl,suffix:null==t?void 0:t.suffix,desc:null==t?void 0:t.desc,isTransparent:(null==t?void 0:t.isTransparent)||!1},this.fullBgShareMixinSettingZhuGeData(t),this.visible=!0},fullBgShareMixinSettingZhuGeData(t){this.buriedCodeSetting={shareObject:(null==t?void 0:t.shareObject)||"活动",pageTitle:(null==t?void 0:t.pageTitle)||"活动",activityName:(null==t?void 0:t.activityName)||"",activityID:(null==t?void 0:t.activityID)||""}},closeFullBgShareMixin(){this.visible=!1,this.$enableScroll()}},beforeDestroy(){this.closeFullBgShareMixin()},deactivated(){this.closeFullBgShareMixin()}}},cb1c:function(t,e,i){"use strict";i("3288")},cd23:function(t,e,i){"use strict";i("a4ed")},e1ba:function(t,e,i){},e982:function(t,e,i){"use strict";i.r(e),i("433b");var s=i("d399"),a=(i("8fdb"),i("20fb")),o=(i("87d0"),i("e41f")),l=(i("14d9"),i("ae31")),n=i("d7a6"),c=i("1f4f"),r=i("696e"),d=i("75cc"),u={data:()=>({skuCode:"",show:!0,productDetail:{},newDetail:{},selectedSpecs:{},purchases:null,stockoutList:{},stockoutCurList:[],isInvalidBtn:!1,stepper:{min:1,max:999},btnName:"确定"}),props:{defaultValue:{type:Number,default:1},maxCount:{type:[Number,String],default:999},skuCodeFromParent:{type:[String,Number],default:""},inCart:{type:Boolean,default:!0}},async created(){this.skuCode=this.skuCodeFromParent,await this.getProductDetail()},components:{"van-popup":o.a,"van-stepper":a.a},computed:{...Object(n.mapState)("common",{userInfo:t=>t.userInfo,myInformation:t=>t.myInformation,isFOA:t=>t.isFOA,isLogin:t=>t.isLogin,shopCode:t=>t.shopCode,orderType:t=>t.orderType}),selectedNameDes(){if(0==this.productDetail.newSaleValueResponses.length)return"";let t="";const{values:e,code:i}=this.productDetail.newSaleValueResponses[0],s=e.find(t=>t.value==this.selectedSpecs[i]);return t=s&&s.limitCount&&s.limitCount>=1?this.selectedSpecs[i]:Object.values(this.selectedSpecs).join(","),t},specification(){const t=this.productDetail.commonAttributes.find(t=>{if("SPECIFICATION"==t.key)return!0});return t&&t.value||""},microTip(){const{microNum:t,unitName:e,productCode:i}=this.productDetail,{limitUnit:s}=t||{};return`每人每月限购${s}${e||"件"}(不限包装形式)${"40456_base"==i?",399元任选6盒。":""}`}},methods:{confirmBtnIsInvalid(){const t=this.productDetail.newSaleValueResponses||[];if(t.length>1){const e=t[0].values.find(e=>e.value==this.selectedSpecs[t[0].code]);let{limitCount:i}=e;i||(i=1);let s=this.selectedSpecs[t[1].code];if("string"==typeof s&&(s=[s]),!s||s.length<i)return void(this.isInvalidBtn=!0)}const e=this.productDetail.stockDTO&&this.productDetail.stockDTO.priority;this.btnName=5===e?"即将开售":1===e?"已停售":"确定",this.newDetail.defaultSelected.isOutOfStock||5===e||1===e?this.isInvalidBtn=!0:this.isInvalidBtn=!1},async getProductDetail(){Object(r.b)({data:{skuCode:this.skuCode,force2Parent:!0},additional:!0,loading:!0}).then(t=>{if(t.defaultSelected.skuCode!==this.skuCode)return this.skuCode=t.defaultSelected.skuCode,void this.getProductDetail();this.newDetail=t,this.productDetail=t.productDetailDTO||{},this.getSelectedSpecsBySkuCode(this.skuCode),this.searchStockoutCurList(),this.confirmBtnIsInvalid(),this.getPurchases()})},getPurchases(){this.newDetail.isMicroProduct&&this.productDetail.microNum&&this.productDetail.microNum.limitUnit&&(this.stepper.max=this.productDetail.microNum.limitUnit)},switchSpecs(t,e,i){if(i)return;const a=this.productDetail.newSaleValueResponses,o=a.length,l=a[t],{value:n,limitCount:c}=l.values[e];let r={};if(0==t)r={isCombined:c&&c>=1,limitCount:c||0};else{const t=a[0].values.find(t=>t.value==this.selectedSpecs[a[0].code]),{limitCount:e}=t;r={isCombined:e&&e>=1,limitCount:e||0}}if(console.log("sss",r),1==o)this.selectedSpecs[l.code]=n,this.skuCode=this.getSkuCodeBySelectedSpecs(),this.getProductDetail();else if(o>1&&r.isCombined)if(0==t){this.selectedSpecs={},this.selectedSpecs[l.code]=n;const{limitCount:t}=r,e=a[1].values.slice(0,t),i=[];e.forEach(t=>{i.push(t.value)}),this.selectedSpecs[a[1].code]=i,this.skuCode=this.getSkuCodeBySelectedSpecs(),this.getProductDetail()}else{const{limitCount:t}=r;if(1==t)this.selectedSpecs[l.code]=[n],this.skuCode=this.getSkuCodeBySelectedSpecs(),this.getProductDetail();else{const e=this.selectedSpecs[l.code],i=e.indexOf(n);i>-1?e.splice(i,1):t>e.length?(e.push(n),e.length==t&&(this.skuCode=this.getSkuCodeBySelectedSpecs(),this.getProductDetail())):Object(s.a)("商品选多啦，试试修改产品组合或取消某个产品呢")}}else this.selectedSpecs[l.code]=n,0==t?delete this.selectedSpecs[a[1].code]:(this.skuCode=this.getSkuCodeBySelectedSpecs(),this.getProductDetail());this.searchStockoutCurList(),this.confirmBtnIsInvalid(),this.$forceUpdate()},getSelectedSpecsBySkuCode(t){const{newSaleValueResponses:e,skuList:i}=this.productDetail,s=i.find(e=>e.skuCode==t);e.forEach(t=>{const e=t.code,i=s.saleAttributes.find(t=>t.key==e);this.selectedSpecs[e]="string"==typeof i.value?i.value:Array.from(i.value)})},searchStockoutCurList(){const t=this.productDetail.newSaleValueResponses||[],e=t.length;if(this.stockoutCurList=[],1==e&&t[0].values.forEach(e=>{const{value:i}=e;({})[t[0].code]=i,e.isOutOfStock&&this.stockoutCurList.push(i)}),e>1){const e=t[0].values.find(e=>e.value==this.selectedSpecs[t[0].code]),{limitCount:i,value:s}=e;i&&i>=1||t[1].values.forEach(e=>{const i={},{value:a}=e;i[t[0].code]=s,i[t[1].code]=a,e.isOutOfStock&&this.stockoutCurList.push(a)})}},getSkuCodeBySelectedSpecs(t){const e=t||this.selectedSpecs,i=Object.keys(e);return this.productDetail.skuList.find(t=>{if((t.saleAttributes||[]).filter(t=>{if(i.indexOf(t.key)>-1&&("string"==typeof e[t.key]?e[t.key]:JSON.stringify(e[t.key].sort()))==("string"==typeof t.value?t.value:JSON.stringify(t.value.sort())))return!0}).length==i.length)return!0}).skuCode},async GroupQuery(t){const e=await Object(d.i)({data:{skuCode:[t],role:this.myInformation.memberType,shopCode:this.shopCode,orderType:this.orderType}});if(e&&e.data&&e.data.length)return e.data[0].skuAndSubResponseDTOList},async getOverseasPrice(t){const e=await this.GroupQuery(t);let i=0;return e.map(t=>{t.labels.includes("OVERSEAS_PURCHASE")&&(i+=t.originPrice.price*t.childSkuAmount)}),i},async addCart(){if(this.isInvalidBtn)return;if(!this.isLogin)return window.localStorage.setItem("loginBackUrl",this.$route.fullPath),void this.$router.push("/login").then();const{combinedType:t,microNum:e,price:i,skuCode:a,skuList:o,productCode:n,labels:r}=this.productDetail,d=e&&e.availableQuantity;if(this.newDetail.isMicroProduct&&d&&(this.purchases=Math.min(this.purchases,d)),this.newDetail.isOverseaProduct){let e;if("VIRTUAL"==t){const t=await this.getOverseasPrice(this.skuCode);e=this.purchases*t}else e=this.purchases*i.price;if(e>5e3)return void Object(s.a)("海外购商品，单笔不允许超过5000元")}const u=Object(l.b)({skuCode:a,skuList:o,productCode:n,quantity:this.purchases},!0,!0,!0);u&&u.then(t=>{t.success?(this.myInformation.ada!=this.userInfo.ada&&r&&-1!=r.indexOf("EXCLUSIVE_PRICE")?Object(s.a)("当前购货人将以微购专属价加购哦~"):Object(s.a)("加入购物车成功"),setTimeout(()=>{s.a.clear(),this.close()},1e3)):Object(c.D)(t,!1)})},confirm(){this.$emit("confirm",{quantity:this.purchases})},close(){this.$parent.showMultiSelect=!1},onChange(){},inputChange(){},handle(t){const e={},i=t.labels||[];return e.isCombined=i.indexOf("COMBINED_PRODUCT_TYPE")>-1,e}}},p=(i("f1d8"),i("cd23"),i("2877")),h=Object(p.a)(u,(function(){var t=this,e=t._self._c;return e("div",{staticClass:"multiPop"},[e("van-popup",{staticStyle:{"border-radius":"8px"},attrs:{closeable:"",overlay:!1},on:{close:t.close},model:{value:t.show,callback:function(e){t.show=e},expression:"show"}},[e("div",{staticClass:"multiContainer"},[e("div",{staticClass:"multiContent"},[t.productDetail.skuCode?[e("div",{staticClass:"content_top"},[e("product-pic",{staticClass:"left",attrs:{"show-min-height":!1,"frame-url":t.productDetail.productFrameUrl,src:t.productDetail.oldGalleryImagesList&&t.productDetail.oldGalleryImagesList.length&&t.productDetail.oldGalleryImagesList[0]["1200Wx1200H"]||""}}),e("div",{staticClass:"right"},[e("div",{staticClass:"priceArea"},[t.newDetail.isVirtualCombined&&t.productDetail.price.combinedPrice?[e("span",{staticClass:"price"},[t._v("组合价"),e("label",[t._v("￥")]),t._v(t._s(t.productDetail.price?t.$priceFixed(t.productDetail.price.combinedPrice):""))]),e("span",{staticClass:"original-price"},[t._v("原价"),e("label",[t._v("￥")]),t._v("3400")])]:e("span",{staticClass:"price"},[e("label",[t._v("￥")]),t._v(t._s(t.productDetail.price?t.$priceFixed(t.productDetail.price.price):""))]),t.newDetail.isOverseaProduct?e("span",{staticClass:"price_tax"},[t._v("进口税预计￥"+t._s(t.productDetail.tax))]):t._e()],2),t.productDetail.newSaleValueResponses.length?e("div",{staticClass:"selectedProduct"},[t._v("已选："+t._s(t.selectedNameDes))]):t._e(),e("div",{staticClass:"selectedProduct"},[t._v("编号："+t._s(t.newDetail.defaultSelected.skuCode))])])],1),e("div",{staticClass:"content_center"},[t.newDetail.isMicroProduct&&t.productDetail.microNum&&t.productDetail.microNum.limitUnit?e("div",{staticClass:"microTip"},[e("span",[t._v(t._s(t.microTip))]),e("i")]):t._e(),e("div",{staticClass:"netContent",domProps:{innerHTML:t._s(t.specification)}}),t._l(t.productDetail.newSaleValueResponses,(function(i,s){return e("div",{key:s},[e("p",{staticClass:"title"},[t._v(t._s(i.name))]),e("div",{staticClass:"selectList"},t._l(i.values,(function(a,o){return e("span",{key:a.value,staticClass:"selectItem",class:{selected:t.selectedSpecs[i.code]&&t.selectedSpecs[i.code]===a.value&&!a.isOutOfStock,stockout:a.isOutOfStock},on:{click:function(e){return t.switchSpecs(s,o,a.isOutOfStock)}}},[a.image?e("img",{attrs:{src:t.$imgDomain+"/"+a.image,alt:""}}):t._e(),t._v(" "+t._s(a.value)+" ")])})),0)])}))],2),e("div",{staticClass:"content_bottom"},[e("label",{staticClass:"txt"},[t._v("数量")]),e("van-stepper",{attrs:{defaultValue:t.defaultValue,integer:"",min:t.stepper.min,max:t.maxCount,"input-width":"35px","button-size":"30px"},on:{change:t.onChange,input:t.inputChange},model:{value:t.purchases,callback:function(e){t.purchases=e},expression:"purchases"}}),t.isLogin?t._e():e("label",{staticClass:"stepper-tip"},[t._v("登录查看还可购买数量")])],1),t.newDetail.isAlmostOutOfStock?e("div",{staticClass:"LOW_STOCK"},[e("i",{staticClass:"iconal icon-xiaoxin-o"}),t._v("库存紧张，欲购从速")]):t._e()]:t._e()],2),e("div",{staticClass:"confirmBtn"},[t.inCart?e("span",{class:{invalid:this.isInvalidBtn},on:{click:t.addCart}},[t._v(t._s(t.btnName))]):e("span",{class:{invalid:this.isInvalidBtn},on:{click:t.confirm}},[t._v(t._s(t.btnName))])])])])],1)}),[],!1,null,"0fd9f354",null);e.default=h.exports},f1d8:function(t,e,i){"use strict";i("9585")}}]);