(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/productWindow/index"],{"066b":function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=2*(t.getWindowInfo().windowHeight*(3/4)-238),r={props:{attr:{type:Object,default:function(){}},storeInfo:{type:Object,default:function(){}},limitNum:{type:Number,value:0},isShow:{type:Number,value:0},iSbnt:{type:Number,value:0},iSplus:{type:Number,value:0},iScart:{type:Number,value:0},is_vip:{type:Number,value:0},type:{type:[Number,String],default:0},fangda:{type:Boolean,default:!0},isExtends:{type:Boolean,default:!1},showFooter:{type:Boolean,default:!1},maskIndex:{type:[Number,String],default:25}},data:function(){return{windowHeight:i,gridShow:1}},computed:{reduceDisabled:function(){return 0==this.type&&this.storeInfo&&this.storeInfo.min_qty?this.storeInfo.min_qty==this.attr.productSelect.cart_num:this.attr.productSelect.cart_num<=1},integralMaxCartNum:function(){if(4!=this.type)return 0;var t=this.attr.productSelect||{},e=Math.max(Number(t.stock||0),0),i=Math.max(Number(t.quota||0),0),r=void 0===t.product_stock?e:Math.max(Number(t.product_stock||0),0),n=Math.min(e,i,r),u=Number(this.storeInfo&&this.storeInfo.num||0);if(-1!==u){var a=Number(this.storeInfo&&this.storeInfo.buy_num||0),o=this.storeInfo&&void 0!==this.storeInfo.user_remain_num?Number(this.storeInfo.user_remain_num||0):Math.max(u-a,0);n=Math.min(n,Math.max(o,0))}return Math.max(Math.floor(n),0)},addDisabled:function(){return 4==this.type?this.integralMaxCartNum<=0||Number(this.attr.productSelect.cart_num||0)>=this.integralMaxCartNum:0==this.type&&this.storeInfo&&this.storeInfo.is_limit&&this.storeInfo.limit_num?this.storeInfo.limit_num==this.attr.productSelect.cart_num:this.attr.productSelect.cart_num>=this.attr.productSelect.stock},isDisabled:function(){if(0==this.type&&(this.storeInfo.min_qty||this.storeInfo.limit_num))return!0}},methods:{isIntegralUserLimitReached:function(){if(4!=this.type||!this.storeInfo)return!1;var t=Number(this.storeInfo.num||0);if(-1===t)return!1;var e=Number(this.storeInfo.buy_num||0);return e>=t},isCurrentSkuSoldOut:function(){return 4==this.type?this.integralMaxCartNum<=0:Number(this.attr.productSelect.stock||0)<=0},soldOutText:function(){return this.isIntegralUserLimitReached()?"已达兑换上限":"已售罄"},toggleGridAttr:function(t){this.gridShow=t},goCat:function(){this.$emit("goCat")},bindCode:function(t){if(4==this.type){var e=this.integralMaxCartNum,i=parseInt(t,10);(!i||i<1)&&(i=e>0?1:0),i>e&&(i=e),this.attr.productSelect.cart_num=i}this.$emit("iptCartNum",this.attr.productSelect.cart_num)},closeAttr:function(){this.$emit("myevent")},CartNumDes:function(){this.reduceDisabled||this.$emit("ChangeCartNum",!1)},CartNumAdd:function(){this.addDisabled||this.$emit("ChangeCartNum",!0)},tapAttr:function(t,e){this.$emit("attrVal",{indexw:t,indexn:e}),this.$set(this.attr.productAttr[t],"index",this.attr.productAttr[t].attr_values[e]);var i=this.getCheckedValue().join(",");this.$emit("ChangeAttr",i)},moveHandle:function(){},getCheckedValue:function(){for(var t=this.attr.productAttr,e=[],i=0;i<t.length;i++)for(var r=0;r<t[i].attr_values.length;r++)t[i].index===t[i].attr_values[r]&&e.push(t[i].attr_values[r]);return e},showImg:function(){this.$emit("getImg")},cartConfirm:function(){this.$emit("onConfirm")},proviewImg:function(e){t.previewImage({current:0,urls:[e]})}}};e.default=r}).call(this,i("df3c")["default"])},"5ea9":function(t,e,i){"use strict";i.d(e,"b",(function(){return r})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var r=function(){var t=this.$createElement,e=(this._self._c,this.isExtends?this.isCurrentSkuSoldOut():null),i=this.isExtends&&e?this.soldOutText():null;this.$mp.data=Object.assign({},{$root:{m0:e,m1:i}})},n=[]},"5ed5":function(t,e,i){"use strict";var r=i("7607"),n=i.n(r);n.a},7607:function(t,e,i){},"88ce":function(t,e,i){"use strict";i.r(e);var r=i("066b"),n=i.n(r);for(var u in r)["default"].indexOf(u)<0&&function(t){i.d(e,t,(function(){return r[t]}))}(u);e["default"]=n.a},bae9:function(t,e,i){"use strict";i.r(e);var r=i("5ea9"),n=i("88ce");for(var u in n)["default"].indexOf(u)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(u);i("5ed5");var a=i("828b"),o=Object(a["a"])(n["default"],r["b"],r["c"],!1,null,"622306b3",null,!1,r["a"],void 0);e["default"]=o.exports}}]);
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
    'components/productWindow/index-create-component',
    {
        'components/productWindow/index-create-component':(function(module, exports, __webpack_require__){
            __webpack_require__('df3c')['createComponent'](__webpack_require__("bae9"))
        })
    },
    [['components/productWindow/index-create-component']]
]);
