Commit defb62d24e622f48f8821c0654241913bbe3cc29
1 parent
0c4e500a
购物车服务卡修改
Showing
1 changed file
with
12 additions
and
1 deletions
pages/cart/cart/cart.js
@@ -2099,7 +2099,18 @@ Page({ | @@ -2099,7 +2099,18 @@ Page({ | ||
2099 | if (th.data.sele_g.viplimited > 0) { | 2099 | if (th.data.sele_g.viplimited > 0) { |
2100 | var gd_buy_num = th.data.promcardbuynum; | 2100 | var gd_buy_num = th.data.promcardbuynum; |
2101 | 2101 | ||
2102 | - if (t.goods_num + gd_buy_num> th.data.sele_g.viplimited) { | 2102 | + if(t.goods_num > th.data.sele_g.goods_num) { |
2103 | + wx.showModal({ | ||
2104 | + title: '超出活动库存', | ||
2105 | + }); | ||
2106 | + | ||
2107 | + var num = th.data.sele_g.goods_num; | ||
2108 | + th.setData({goodsInputNum: num}) | ||
2109 | + return false; | ||
2110 | + | ||
2111 | + }; | ||
2112 | + | ||
2113 | + if ((t.goods_num + gd_buy_num> th.data.sele_g.viplimited) && (t.goods_num <= th.data.sele_g.goods_num)) { | ||
2103 | wx.showModal({ | 2114 | wx.showModal({ |
2104 | title: '超出活动限购数量', | 2115 | title: '超出活动限购数量', |
2105 | }); | 2116 | }); |