diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index da613da..c329ce8 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -856,7 +856,8 @@ Page({ if(!th.data.sto_sele_name) { getApp().my_warnning('请选择门店', 1, th, 450); return false; - } + }; + @@ -883,25 +884,33 @@ Page({ // } //000000 - this.data.sele_g.viplimited = this.data.sele_g.buy_limit; - if(this.data.sele_g.viplimited > 0 && !this.data.is_normal && this.data.prom_type == 1) { - var t = th.data.goodsInputNum; - th.data.sele_g.viplimited = th.data.sele_g.buy_limit; - if (th.data.sele_g.viplimited > 0) { - var gd_buy_num = th.data.sele_g.buy_num; - - if (t + gd_buy_num > th.data.sele_g.viplimited) { - wx.showModal({ - title: '超出活动限购数量', - }); - - let num = th.data.sele_g.viplimited - gd_buy_num; - if (num <= 0) num = 1; - th.setData({goodsInputNum: num}); - return false; - } + // if(!this.data.openSpecModal_ind) { + if(this.data.prom_type == 1) { + this.data.sele_g.viplimited = this.data.sele_g.buy_limit; }; - }; + + if(this.data.sele_g.viplimited > 0 && !this.data.is_normal && this.data.prom_type == 1) { + var t = th.data.goodsInputNum; + th.data.sele_g.viplimited = th.data.sele_g.buy_limit; + if (th.data.sele_g.viplimited > 0) { + var gd_buy_num = th.data.sele_g.buy_num; + + if (t + gd_buy_num > th.data.sele_g.viplimited) { + wx.showModal({ + title: '超出活动限购数量', + }); + + let num = th.data.sele_g.viplimited - gd_buy_num; + if (num <= 0) num = 1; + th.setData({goodsInputNum: num}); + return false; + } + }; + }; + + // }; + + @@ -1064,10 +1073,15 @@ Page({ //------检查数量是不是超出限购------ checkCartNum: function(t) { + if(this.data.prom_type != 1) { + this.setData({goodsInputNum: t}); + return false; + }; + var th = this; // if(this.data.prom_act.is_shop_buy && this.data.options.prom_type != 1) { - + if(t == 0) return false; // th.setData({goodsInputNum:t});