(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-distributor-index"],{"16a7":function(t,i,e){"use strict";var a=e("9fb6"),r=e.n(a);r.a},"2b00":function(t,i,e){"use strict";e("7a82");var a=e("4ea4").default;Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0,e("a9e3");var r=e("6859"),s=e("f823"),o=e("736f"),n=a(e("b739")),d=e("26cb"),c=e("f26a"),u={components:{ProductWindow:n.default},computed:(0,d.mapGetters)(["viewColor","keyColor"]),data:function(){return{domain:c.HTTP_REQUEST_URL,explainShow:!1,menus:[],fastList:[],userInfo:{},distribution:[],explainTxt:"",attr:{cartAttr:!1,productAttr:[],productSelect:{}},productValue:[],storeInfo:{},attrValue:"",attrTxt:"请选择",cart_num:1,id:0,loadend:!1,loading:!1,loadTitle:"加载更多",where:{page:1,limit:20},openActivity:!1}},onLoad:function(){},onShow:function(){this.bagExplain(),this.productBag(),this.bagRecommend(),this.getUserInfo()},onReachBottom:function(){this.productBag()},methods:{goBuy:function(t){this.id=t.product_id,this.getGoodsDetails(t)},onMyEvent:function(){this.$set(this.attr,"cartAttr",!1)},getGoodsDetails:function(t){uni.showLoading({title:"加载中",mask:!0});var i=this;(0,o.getProductDetail)(t.product_id).then((function(t){uni.hideLoading(),i.attr.cartAttr=!0;var e=t.data;i.$set(i,"storeInfo",e),i.$set(i.attr,"productAttr",t.data.attr),i.$set(i,"productValue",t.data.sku),i.DefaultSelect()})).catch((function(t){uni.hideLoading()}))},ChangeAttr:function(t){var i=this.productValue[t];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,"svip_price",i.svip_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,"attrValue",t),this.$set(this,"attrTxt","已选择")):(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"svip_price",i.svip_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,"attrValue",""),this.$set(this,"attrTxt","请选择"))},DefaultSelect:function(){var t=this.attr.productAttr,i=[];for(var e in this.productValue)if(this.productValue[e].stock>0){i=this.attr.productAttr.length?e.split(","):[];break}for(var a=0;ae&&(this.$set(this.attr.productSelect,"cart_num",e),this.$set(this,"cart_num",e))):(a.cart_num--,a.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])},iptCartNum:function(t){this.$set(this.attr.productSelect,"cart_num",t)},goPay:function(){var t=this,i=t.productValue[this.attrValue];if(t.attr.productAttr.length&&0==i.stock)return t.$util.Tips({title:"产品库存不足,请选择其它"});var e={product_id:t.id,cart_num:Number(t.attr.productSelect.cart_num),is_new:1,product_attr_unique:void 0!==t.attr.productSelect?t.attr.productSelect.unique:""};(0,o.postCartAdd)(e).then((function(i){t.attr.cartAttr=!1,uni.navigateTo({url:"/pages/users/order_confirm/index?cartId="+i.data.cart_id})})).catch((function(i){return t.$util.Tips({title:i})}))},godDetail:function(t){(0,s.goShopDetail)(t).then((function(i){uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.product_id)})}))},productBag:function(){var t=this;t.loadend||t.loading||(t.loading=!0,t.loadTitle="",(0,o.productBag)(t.where).then((function(i){var e=i.data.list,a=t.$util.SplitArray(e,t.distribution),r=e.length0?e("v-uni-view",{staticClass:"public_title acea-row row-center-wrapper"},[e("v-uni-image",{attrs:{src:t.domain+"/static/diy/linefx"+t.keyColor+".png"}}),e("v-uni-view",{staticClass:"name"},[t._v("推荐礼包")]),e("v-uni-image",{staticClass:"right",attrs:{src:t.domain+"/static/diy/linefx"+t.keyColor+".png"}})],1):t._e(),t.fastList.length>0?e("v-uni-view",{staticClass:"scroll-product"},[e("v-uni-scroll-view",{staticClass:"scroll-view_x",staticStyle:{width:"auto",overflow:"hidden"},attrs:{"scroll-x":!0}},[t._l(t.fastList,(function(i,a){return[e("v-uni-view",{key:a+"_0",staticClass:"itemCon"},[e("v-uni-view",{staticClass:"item acea-row row-right"},[e("v-uni-view",{staticClass:"picTxt acea-row row-between-wrapper",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.godDetail(i)}}},[e("v-uni-view",{staticClass:"pictrue"},[e("v-uni-image",{attrs:{src:i.image}})],1),e("v-uni-view",{staticClass:"text"},[e("v-uni-view",{staticClass:"name line1"},[t._v(t._s(i.store_name))]),e("v-uni-view",{staticClass:"acea-row row-bottom price_count"},[e("v-uni-view",{staticClass:"money p-color"},[t._v("¥"),e("v-uni-text",{staticClass:"num"},[t._v(t._s(i.price))])],1),i.show_svip_info&&i.show_svip_info.show_svip_price&&i.svip_price?e("v-uni-view",{staticClass:"acea-row row-middle svip-count"},[e("v-uni-text",{staticClass:"vip-money"},[t._v("¥"+t._s(i.svip_price))]),e("v-uni-view",{staticClass:"vipImg"},[e("v-uni-image",{attrs:{src:t.domain+"/static/images/svip.png"}})],1)],1):t._e()],1)],1)],1),e("v-uni-view",{staticClass:"circular"}),e("v-uni-view",{staticClass:"open b-color",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.goBuy(i)}}},[t._v("立即开通")])],1)],1)]}))],2)],1):t._e()],1):t._e(),t.openActivity?e("v-uni-view",{staticClass:"pin"},[e("v-uni-view",{staticClass:"public_title acea-row row-center-wrapper"},[e("v-uni-image",{attrs:{src:t.domain+"/static/diy/linefx"+t.keyColor+".png"}}),e("v-uni-view",{staticClass:"name"},[t._v("分销礼包")]),e("v-uni-image",{staticClass:"right",attrs:{src:t.domain+"/static/diy/linefx"+t.keyColor+".png"}})],1),e("v-uni-view",{staticClass:"list"},t._l(t.distribution,(function(i,a){return e("v-uni-view",{key:a,staticClass:"item acea-row row-between-wrapper",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.godDetail(i)}}},[e("v-uni-view",{staticClass:"pictrue"},[e("v-uni-image",{attrs:{src:i.image}})],1),e("v-uni-view",{staticClass:"text"},[e("v-uni-view",{staticClass:"name line1"},[t._v(t._s(i.store_name))]),e("v-uni-view",{staticClass:"acea-row"},[e("v-uni-view",{staticClass:"money p-color"},[t._v("¥"),e("v-uni-text",{staticClass:"num"},[t._v(t._s(i.price))])],1),i.show_svip_info&&i.show_svip_info.show_svip_price&&i.svip_price?e("v-uni-view",{staticClass:"acea-row row-middle svip-count"},[e("v-uni-text",{staticClass:"vip-money"},[t._v("¥"+t._s(i.svip_price))]),e("v-uni-view",{staticClass:"vipImg"},[e("v-uni-image",{attrs:{src:t.domain+"/static/images/svip.png"}})],1)],1):t._e()],1),e("v-uni-view",{staticClass:"open b-color",on:{click:function(e){e.stopPropagation(),arguments[0]=e=t.$handleEvent(e),t.goBuy(i)}}},[t._v("立即开通")])],1)],1)})),1),t.distribution.length>0?e("v-uni-view",{staticClass:"loadingicon acea-row row-center-wrapper"},[e("v-uni-text",{staticClass:"loading iconfont icon-jiazai",attrs:{hidden:0==t.loading}}),t._v(t._s(t.loadTitle))],1):t._e()],1):t._e(),e("v-uni-view",{staticClass:"explainTxt",class:t.explainShow?"on":""},[e("v-uni-view",{staticClass:"name"},[t._v("分销说明"),e("v-uni-text",{staticClass:"iconfont icon-guanbi",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.close.apply(void 0,arguments)}}})],1),e("v-uni-view",{staticClass:"conter"},[t._v(t._s(t.explainTxt))])],1),t.explainShow?e("v-uni-view",{staticClass:"mask"}):t._e(),e("productWindow",{attrs:{attr:t.attr,isShow:1,iSplus:1,destri:1,svipPrice:!0,id:"product-window"},on:{myevent:function(i){arguments[0]=i=t.$handleEvent(i),t.onMyEvent.apply(void 0,arguments)},ChangeAttr:function(i){arguments[0]=i=t.$handleEvent(i),t.ChangeAttr.apply(void 0,arguments)},attrVal:function(i){arguments[0]=i=t.$handleEvent(i),t.attrVal.apply(void 0,arguments)},iptCartNum:function(i){arguments[0]=i=t.$handleEvent(i),t.iptCartNum.apply(void 0,arguments)},goCat:function(i){arguments[0]=i=t.$handleEvent(i),t.goPay.apply(void 0,arguments)}}})],1)},r=[]},"9fb6":function(t,i,e){var a=e("333a");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var r=e("4f06").default;r("413085c6",a,!0,{sourceMap:!1,shadowMode:!1})},f823:function(t,i,e){"use strict";e("7a82"),Object.defineProperty(i,"__esModule",{value:!0}),i.goShopDetail=function(t,i){return new Promise((function(i){1===t.product_type?uni.navigateTo({url:"/pages/activity/goods_seckill_details/index?id=".concat(t.product_id,"&time=").concat(t.stop_time)}):2===t.product_type?uni.navigateTo({url:"/pages/activity/presell_details/index?id=".concat(t.activity_id)}):0===t.product_type||10===t.product_type?uni.navigateTo({url:"/pages/goods_details/index?id=".concat(t.product_id)}):4===t.product_type?uni.navigateTo({url:"/pages/activity/combination_details/index?id=".concat(t.activity_id)}):40===t.product_type?uni.navigateTo({url:"/pages/activity/combination_status/index?id=".concat(t.activity_id)}):i(t)}))},e("d3b7"),e("99af")}}]);