diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js index 2847890..505c1af 100644 --- a/packageC/pages/presell/cart/cart.js +++ b/packageC/pages/presell/cart/cart.js @@ -116,7 +116,8 @@ Page({ order_sn: '', order_id: '', exp_price:0, - order_prom_amount:0 + order_prom_amount:0, + paying:0 }, onLoad: function (t) { @@ -2284,6 +2285,10 @@ Page({ //选择支付方式 set_pay_type: function (e) { + + if(this.data.paying) return false; + this.data.paying=1; + var type = e.currentTarget.dataset.type; this.to_pay_type(type); }, @@ -2367,8 +2372,10 @@ Page({ send_time = th.data.pre_arr.delivery_daynum * 3600; } th.setData({ isclose: 0, 'order.order_status': 1, 'order.pay_status': 1, 'wait_wk': 0, 'presell.tail_pay_state': 1, 'wait_fh': 1, send_time: send_time }); + this.data.paying=0; }, function () { + this.data.paying=0; getApp().my_warnning("支付失败", 0, th); }) } else { @@ -2384,6 +2391,7 @@ Page({ } else { getApp().my_warnning(t.data.msg, 1, th); } + this.data.paying=0; } } }); diff --git a/packageC/pages/presell/cart/cart2_pre.js b/packageC/pages/presell/cart/cart2_pre.js index 1822bf5..51f4636 100644 --- a/packageC/pages/presell/cart/cart2_pre.js +++ b/packageC/pages/presell/cart/cart2_pre.js @@ -875,8 +875,10 @@ Page({ pdata.forEach(function (em, ind) { order_amount += em.order_amount; }) + + //要进行判断,如果是用微信支付,就要跳转到支付界面 - if (order_amount > 0) { + if (order_amount && parseFloat(order_amount) > 0) { th.setData({ isclose: 0 }); util_pay.pay(data.data, function () { var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data; diff --git a/pages/cart/cart_wk/cart_wk.js b/pages/cart/cart_wk/cart_wk.js index 1ede2a0..1fb6e05 100644 --- a/pages/cart/cart_wk/cart_wk.js +++ b/pages/cart/cart_wk/cart_wk.js @@ -48,6 +48,9 @@ Page({ bn_is_order_yh:1, //是不是订单优惠 bn_is_post_temp:1, //是不是进行计算包邮模板 + + paying:0 //支付中 + }, /** @@ -528,6 +531,10 @@ Page({ //选择支付方式 set_pay_type: function (e) { + + if(this.data.paying) return false; + this.data.paying=1; + var type = e.currentTarget.dataset.type; this.to_pay_type(type); }, @@ -605,6 +612,7 @@ Page({ var allmoney = th.data.allpice; th.jumpPaymentPage(th.data.order.order_sn, allmoney); }, function () { + th.data.paying=0; getApp().my_warnning("支付失败", 0, th); }) } else { @@ -618,12 +626,15 @@ Page({ }); setTimeout(function () { th.setData({ isclose: 0 }); + th.data.paying=0; wx.redirectTo({ url: "/pages/user/order_list/order_list" }) }, 1000) } else { - getApp().my_warnning(t.data.msg, 1, th); + + th.data.paying=0; + getApp().my_warnning(t.data.msg, 1, th); } } } diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js index 555f7b2..7c0a36b 100644 --- a/pages/goods/goodsInfo/goodsInfo.js +++ b/pages/goods/goodsInfo/goodsInfo.js @@ -4385,6 +4385,9 @@ Page({ //---判断拼单---- if (prom_type == 6) { + + th.setData({user_order_pt_state: 0 }); + //-------判断活动是否抢光--------- await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, { 1: 1