diff --git a/packageA/pages/goodsInfo/goodsInfo.js b/packageA/pages/goodsInfo/goodsInfo.js index 65a16df..df07dc9 100644 --- a/packageA/pages/goodsInfo/goodsInfo.js +++ b/packageA/pages/goodsInfo/goodsInfo.js @@ -887,27 +887,29 @@ Page({ // 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; - } + + if(this.data.sele_g.viplimited > 0 && !this.data.is_normal) { + 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; + } + }; }; }; + + // };