Commit 72ba7fd5f40a85c0355e47c31f1410e14b0369ad
1 parent
aed8e658
积分购超库存优化
Showing
1 changed file
with
4 additions
and
1 deletions
pages/goods/goodsInfo/goodsInfo.js
@@ -2689,12 +2689,15 @@ Page({ | @@ -2689,12 +2689,15 @@ Page({ | ||
2689 | 2689 | ||
2690 | //判断积分购库存 | 2690 | //判断积分购库存 |
2691 | if (!th.data.is_normal && th.data.prom_type == 4) { | 2691 | if (!th.data.is_normal && th.data.prom_type == 4) { |
2692 | - var i_canbuy = th.data.prom_act.limitqty - th.data.prom_act.buy_num; | 2692 | + var i_canbuy = th.data.prom_act.limitqty - th.data.prom_act.buy_num; |
2693 | if (t > i_canbuy) { | 2693 | if (t > i_canbuy) { |
2694 | wx.showToast({ | 2694 | wx.showToast({ |
2695 | title: '超出商品活动库存', | 2695 | title: '超出商品活动库存', |
2696 | icon: 'none', | 2696 | icon: 'none', |
2697 | }); | 2697 | }); |
2698 | + th.setData({ | ||
2699 | + goodsInputNum: i_canbuy | ||
2700 | + }) | ||
2698 | // s.my_warnning('超出商品活动库存', 0, th); | 2701 | // s.my_warnning('超出商品活动库存', 0, th); |
2699 | return false; | 2702 | return false; |
2700 | } | 2703 | } |