Commit 72ba7fd5f40a85c0355e47c31f1410e14b0369ad

Authored by 前端开发-罗建龙
1 parent aed8e658

积分购超库存优化

pages/goods/goodsInfo/goodsInfo.js
... ... @@ -2689,12 +2689,15 @@ Page({
2689 2689  
2690 2690 //判断积分购库存
2691 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 2693 if (t > i_canbuy) {
2694 2694 wx.showToast({
2695 2695 title: '超出商品活动库存',
2696 2696 icon: 'none',
2697 2697 });
  2698 + th.setData({
  2699 + goodsInputNum: i_canbuy
  2700 + })
2698 2701 // s.my_warnning('超出商品活动库存', 0, th);
2699 2702 return false;
2700 2703 }
... ...