Commit e846192aceabf4fc0882030ea70278cc2a7861bd
1 parent
db9eda80
服务卡秒杀修改
Showing
1 changed file
with
12 additions
and
1 deletions
packageA/pages/goodsInfo/goodsInfo.js
@@ -1138,7 +1138,18 @@ Page({ | @@ -1138,7 +1138,18 @@ Page({ | ||
1138 | if (th.data.sele_g.viplimited > 0 && !th.data.is_normal && th.data.prom_type == 1) { | 1138 | if (th.data.sele_g.viplimited > 0 && !th.data.is_normal && th.data.prom_type == 1) { |
1139 | var gd_buy_num = th.data.promcardbuynum; | 1139 | var gd_buy_num = th.data.promcardbuynum; |
1140 | 1140 | ||
1141 | - if (t + gd_buy_num> th.data.sele_g.viplimited) { | 1141 | + if(t > th.data.sele_g.goods_num) { |
1142 | + wx.showModal({ | ||
1143 | + title: '超出活动库存', | ||
1144 | + }); | ||
1145 | + | ||
1146 | + var num = th.data.sele_g.goods_num; | ||
1147 | + th.setData({goodsInputNum: num}) | ||
1148 | + return false; | ||
1149 | + | ||
1150 | + }; | ||
1151 | + | ||
1152 | + if ((t + gd_buy_num> th.data.sele_g.viplimited) && (t<=th.data.sele_g.goods_num)) { | ||
1142 | wx.showModal({ | 1153 | wx.showModal({ |
1143 | title: '超出活动限购数量', | 1154 | title: '超出活动限购数量', |
1144 | }); | 1155 | }); |