Commit 73c38c9dcf1c2f8834638d99925989523e6be6b7

Authored by season
2 parents fd39dbd9 714a13db

Merge branch 'test' of http://git.vipzhuang.cn/wxd/MShopWeApp into qa

packageC/pages/presell/cart/cart.js
... ... @@ -116,7 +116,8 @@ Page({
116 116 order_sn: '',
117 117 order_id: '',
118 118 exp_price:0,
119   - order_prom_amount:0
  119 + order_prom_amount:0,
  120 + paying:0
120 121 },
121 122 onLoad: function (t) {
122 123  
... ... @@ -2284,6 +2285,10 @@ Page({
2284 2285  
2285 2286 //选择支付方式
2286 2287 set_pay_type: function (e) {
  2288 +
  2289 + if(this.data.paying) return false;
  2290 + this.data.paying=1;
  2291 +
2287 2292 var type = e.currentTarget.dataset.type;
2288 2293 this.to_pay_type(type);
2289 2294 },
... ... @@ -2367,8 +2372,10 @@ Page({
2367 2372 send_time = th.data.pre_arr.delivery_daynum * 3600;
2368 2373 }
2369 2374 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 });
  2375 + this.data.paying=0;
2370 2376  
2371 2377 }, function () {
  2378 + this.data.paying=0;
2372 2379 getApp().my_warnning("支付失败", 0, th);
2373 2380 })
2374 2381 } else {
... ... @@ -2384,6 +2391,7 @@ Page({
2384 2391 } else {
2385 2392 getApp().my_warnning(t.data.msg, 1, th);
2386 2393 }
  2394 + this.data.paying=0;
2387 2395 }
2388 2396 }
2389 2397 });
... ...
packageC/pages/presell/cart/cart2_pre.js
... ... @@ -875,8 +875,10 @@ Page({
875 875 pdata.forEach(function (em, ind) {
876 876 order_amount += em.order_amount;
877 877 })
  878 +
  879 +
878 880 //要进行判断,如果是用微信支付,就要跳转到支付界面
879   - if (order_amount > 0) {
  881 + if (order_amount && parseFloat(order_amount) > 0) {
880 882 th.setData({ isclose: 0 });
881 883 util_pay.pay(data.data, function () {
882 884 var url = "/packageC/pages/presell/cart/cart?order_sn=" + data.data;
... ...
pages/cart/cart_wk/cart_wk.js
... ... @@ -48,6 +48,9 @@ Page({
48 48  
49 49 bn_is_order_yh:1, //是不是订单优惠
50 50 bn_is_post_temp:1, //是不是进行计算包邮模板
  51 +
  52 + paying:0 //支付中
  53 +
51 54 },
52 55  
53 56 /**
... ... @@ -528,6 +531,10 @@ Page({
528 531  
529 532 //选择支付方式
530 533 set_pay_type: function (e) {
  534 +
  535 + if(this.data.paying) return false;
  536 + this.data.paying=1;
  537 +
531 538 var type = e.currentTarget.dataset.type;
532 539 this.to_pay_type(type);
533 540 },
... ... @@ -605,6 +612,7 @@ Page({
605 612 var allmoney = th.data.allpice;
606 613 th.jumpPaymentPage(th.data.order.order_sn, allmoney);
607 614 }, function () {
  615 + th.data.paying=0;
608 616 getApp().my_warnning("支付失败", 0, th);
609 617 })
610 618 } else {
... ... @@ -618,12 +626,15 @@ Page({
618 626 });
619 627 setTimeout(function () {
620 628 th.setData({ isclose: 0 });
  629 + th.data.paying=0;
621 630 wx.redirectTo({
622 631 url: "/pages/user/order_list/order_list"
623 632 })
624 633 }, 1000)
625 634 } else {
626   - getApp().my_warnning(t.data.msg, 1, th);
  635 +
  636 + th.data.paying=0;
  637 + getApp().my_warnning(t.data.msg, 1, th);
627 638 }
628 639 }
629 640 }
... ...
pages/goods/goodsInfo/goodsInfo.js
... ... @@ -4385,6 +4385,9 @@ Page({
4385 4385  
4386 4386 //---判断拼单----
4387 4387 if (prom_type == 6) {
  4388 +
  4389 + th.setData({user_order_pt_state: 0 });
  4390 +
4388 4391 //-------判断活动是否抢光---------
4389 4392 await getApp().request.promiseGet("/api/weshop/activitylist/getActLen/" + os.stoid + "/" + prom_type + "/" + prom_id, {
4390 4393 1: 1
... ...