diff --git a/pages/cart/cart/cart.js b/pages/cart/cart/cart.js index 2748cbb..6751379 100644 --- a/pages/cart/cart/cart.js +++ b/pages/cart/cart/cart.js @@ -2077,7 +2077,9 @@ Page({ wx.showModal({ title: '超出活动限购', }); - th.setData({[txt]: buylimit}); + let num = buylimit - gd_buy_num; + if (num <= 0) num = 1; + th.setData({[txt]: num}); return false; }; @@ -2085,7 +2087,7 @@ Page({ if(t.goods_num > redis_num) { wx.showModal({ - title: '超出活动库存2', + title: '超出活动库存', }); th.setData({[txt]: redis_num}); return false;