Commit 4c79002d6c99d432637a5c02cd18257dcd355a1f
1 parent
21b1edc4
订单的再次支付的bug优化
Showing
3 changed files
with
6 additions
and
9 deletions
packageC/pages/presell/cart/cart.js
@@ -2756,13 +2756,8 @@ Page({ | @@ -2756,13 +2756,8 @@ Page({ | ||
2756 | } | 2756 | } |
2757 | 2757 | ||
2758 | //商品的普通购买 ,不要进行判断 | 2758 | //商品的普通购买 ,不要进行判断 |
2759 | - if ((good.prom_type == 1 || good.prom_type == 6 || good.prom_type == 4) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal) { | ||
2760 | - if (gg.prom_type != good.prom_type) { | 2759 | + if ((good.prom_type == 1 || good.prom_type == 2 || good.prom_type == 4 || good.prom_type == 6 || good.prom_type == 8 || good.prom_type == 9 ) && !good.is_gift && !good.is_collocation && !good.is_integral_normal && !good.is_pd_normal) { |
2761 | 2760 | ||
2762 | - var content = gg.goods_name + '商品的活动发生了变化,请取消订单重新购买'; | ||
2763 | - th.toast(content); | ||
2764 | - return false; | ||
2765 | - } | ||
2766 | } else { | 2761 | } else { |
2767 | if ((gg.prom_type == 1 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) | 2762 | if ((gg.prom_type == 1 || gg.prom_type == 3 || gg.prom_type == 5 || gg.prom_type == 6 || gg.prom_type == 4) |
2768 | && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { | 2763 | && !good.is_collocation && !good.is_gift && !good.is_integral_normal && !good.is_pd_normal) { |
pages/user/order_detail/order_detail.js
@@ -1046,7 +1046,7 @@ Page({ | @@ -1046,7 +1046,7 @@ Page({ | ||
1046 | var pre_arr = all_pre_goods[idx]; | 1046 | var pre_arr = all_pre_goods[idx]; |
1047 | var prom_buy_limit = pre_arr.vip_butyqty; | 1047 | var prom_buy_limit = pre_arr.vip_butyqty; |
1048 | 1048 | ||
1049 | - if (goods.goods_num > th.data.pre_arr.presell_sumqty - th.data.pre_arr.buy_goodnum) { | 1049 | + if (goodsinfo.goods_num > pre_arr.presell_sumqty - pre_arr.buy_goodnum) { |
1050 | wx.showToast({ title: "超出活动商品库存", icon: 'none', duration: 3000 }); | 1050 | wx.showToast({ title: "超出活动商品库存", icon: 'none', duration: 3000 }); |
1051 | return false; | 1051 | return false; |
1052 | } | 1052 | } |
pages/user/order_list/order_list.js
@@ -843,8 +843,10 @@ Page({ | @@ -843,8 +843,10 @@ Page({ | ||
843 | } | 843 | } |
844 | }) | 844 | }) |
845 | 845 | ||
846 | + | ||
846 | if (presellList) { | 847 | if (presellList) { |
847 | 848 | ||
849 | + | ||
848 | if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) { | 850 | if (good.goods_num > presellList.presell_sumqty - presellList.buy_goodnum) { |
849 | var content = good.goods_name + '购买数量超出商品库存,请取消订单'; | 851 | var content = good.goods_name + '购买数量超出商品库存,请取消订单'; |
850 | th.toast(content); | 852 | th.toast(content); |
@@ -861,7 +863,7 @@ Page({ | @@ -861,7 +863,7 @@ Page({ | ||
861 | 863 | ||
862 | } | 864 | } |
863 | } | 865 | } |
864 | - | 866 | + |
865 | //如果优惠促销和搭配购的时候 | 867 | //如果优惠促销和搭配购的时候 |
866 | if ((good.prom_type == 3 || good.prom_type == 5 || good.prom_type == 10) && good.is_gift != 1 && good.is_collocation != 1) { | 868 | if ((good.prom_type == 3 || good.prom_type == 5 || good.prom_type == 10) && good.is_gift != 1 && good.is_collocation != 1) { |
867 | var p_ok = 1, is_g_prom = 0; | 869 | var p_ok = 1, is_g_prom = 0; |
@@ -1343,7 +1345,7 @@ Page({ | @@ -1343,7 +1345,7 @@ Page({ | ||
1343 | var pre_arr = all_pre_goods[idx]; | 1345 | var pre_arr = all_pre_goods[idx]; |
1344 | var prom_buy_limit = pre_arr.vip_butyqty; | 1346 | var prom_buy_limit = pre_arr.vip_butyqty; |
1345 | 1347 | ||
1346 | - if (goods.goods_num > th.data.pre_arr.presell_sumqty - th.data.pre_arr.buy_goodnum) { | 1348 | + if (goodsinfo.goods_num > pre_arr.presell_sumqty - pre_arr.buy_goodnum) { |
1347 | wx.showToast({ title: "超出活动商品库存", icon: 'none', duration: 3000 }); | 1349 | wx.showToast({ title: "超出活动商品库存", icon: 'none', duration: 3000 }); |
1348 | return false; | 1350 | return false; |
1349 | } | 1351 | } |