Commit 6bf7b9f105b9b91a71f06af88ebbc0cc5d441532
1 parent
0c72a044
1、拼团自定义的优化
2、 订单列表的待支付的问题优化
Showing
5 changed files
with
351 additions
and
147 deletions
components/diy_pingd_buy/diy_pingd_buy.js
... | ... | @@ -49,12 +49,15 @@ Component({ |
49 | 49 | clearInterval(this.data.timer); |
50 | 50 | } |
51 | 51 | }, |
52 | - | |
53 | - | |
52 | + | |
54 | 53 | ready: function() { |
55 | 54 | console.log("ready"); |
56 | 55 | var g_id = this.data.object.data; |
56 | + var data_type = this.data.object.data_type; | |
57 | 57 | console.log(g_id); |
58 | + if(data_type!=2){ | |
59 | + g_id=null; | |
60 | + } | |
58 | 61 | this.init(g_id); |
59 | 62 | }, |
60 | 63 | detached() { | ... | ... |
packageA/pages/details_serviceCard/details_serviceCard.js
... | ... | @@ -4,6 +4,7 @@ const app = getApp(); |
4 | 4 | const os = app.globalData.setting; |
5 | 5 | let self = null; |
6 | 6 | var util = require('../../../utils/util.js'); |
7 | +const ut = require("../../../utils/util.js"); | |
7 | 8 | |
8 | 9 | Page({ |
9 | 10 | |
... | ... | @@ -513,7 +514,7 @@ Page({ |
513 | 514 | |
514 | 515 | |
515 | 516 | // 立即支付 |
516 | - pay() { | |
517 | + async pay() { | |
517 | 518 | |
518 | 519 | if(this.data.is_summit_ing) return false; |
519 | 520 | this.data.is_summit_ing=1; |
... | ... | @@ -522,51 +523,201 @@ Page({ |
522 | 523 | let order_sn = this.data.details.order_sn; |
523 | 524 | let order_id = this.data.details.order_id; |
524 | 525 | let store_id = app.globalData.setting.stoid; |
525 | - t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); | |
526 | - t_pay.pay({ | |
527 | - parentSn: order_sn, | |
528 | - store_id: store_id | |
529 | - }, function () { | |
530 | - app.showWarning('支付成功'); | |
531 | - setTimeout(function() { | |
532 | - wx.reLaunch({ | |
533 | - url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
534 | - }) | |
535 | - }, 1000) | |
536 | - | |
537 | - }, function (e) { | |
538 | - th.data.is_summit_ing=0; | |
539 | - wx.showToast({ | |
540 | - title: e, | |
541 | - icon: 'none', | |
542 | - duration: 2000 | |
543 | - }); | |
544 | - }) | |
545 | - // app.request.post('/api/weshop/order/pay/createRechargeOrder', { | |
546 | - // data: { | |
547 | - // parentSn: order_sn, | |
548 | - // store_id: store_id, | |
549 | - // }, | |
550 | - // | |
551 | - // success: function(res) { | |
552 | - // var n = res.data.data; | |
553 | - // self.weixinPay(n, function() { | |
554 | - // app.showWarning('支付成功'); | |
555 | - // // setTimeout(function() { | |
556 | - // // wx.reLaunch({ | |
557 | - // // url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
558 | - // // }) | |
559 | - // // }, 1000) | |
560 | - // }, function() { | |
561 | - // app.showWarning('支付失败'); | |
562 | - // // setTimeout(function() { | |
563 | - // // wx.reLaunch({ | |
564 | - // // url: '/packageA/pages/cardList/cardList', | |
565 | - // // }) | |
566 | - // // }, 1000) | |
567 | - // }); | |
568 | - // } | |
569 | - // }) | |
526 | + let user_id = os.user_id; | |
527 | + | |
528 | + let flag = true; | |
529 | + // 如果是普通购买或单独购买,不用判断 | |
530 | + // 如果是秒杀购买:1、判断活动是否变化;2、是否超出限购 | |
531 | + let list = this.data.details.list; | |
532 | + var pt_act=null; //-- 拼团活动的优化 -- | |
533 | + | |
534 | + //秒杀活动和拼团活动要重新计算一下 | |
535 | + for (const it of list) { | |
536 | + if (it.prom_type == 1) { | |
537 | + let act_details = null; | |
538 | + let redis_num = 0; | |
539 | + let promcardbuynum = 0; | |
540 | + let qty = it.qty; | |
541 | + | |
542 | + | |
543 | + await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { | |
544 | + console.log('11111111====>>>'); | |
545 | + if (res.data.code == 0) { | |
546 | + console.log('当前的秒杀活动信息:', res.data.data); | |
547 | + act_details = res.data.data; | |
548 | + if (act_details.is_end == 1) { | |
549 | + wx.showModal({ | |
550 | + title: '提示', | |
551 | + content: '活动已结束,无法支付,请取消订单!', | |
552 | + showCancel: false, | |
553 | + }); | |
554 | + flag = false; | |
555 | + return false; | |
556 | + }; | |
557 | + if (act_details.id != it.prom_id) { | |
558 | + wx.showModal({ | |
559 | + title: '提示', | |
560 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
561 | + showCancel: false, | |
562 | + }); | |
563 | + flag = false; | |
564 | + return false; | |
565 | + }; | |
566 | + | |
567 | + | |
568 | + var t_now = ut.gettimestamp(); | |
569 | + if (act_details.is_end == 0 && act_details.start_time < t_now && act_details.end_time > t_now) { | |
570 | + wx.showModal({ | |
571 | + title: '提示', | |
572 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
573 | + showCancel: false, | |
574 | + }); | |
575 | + flag = false; | |
576 | + return false; | |
577 | + } | |
578 | + | |
579 | + }; | |
580 | + }); | |
581 | + | |
582 | + if(act_details.buy_limit>0 && flag){ | |
583 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
584 | + data: { | |
585 | + store_id: store_id, | |
586 | + user_id: user_id, | |
587 | + card_id: it.card_id, | |
588 | + prom_type: it.prom_type, | |
589 | + prom_id: it.prom_id, | |
590 | + } | |
591 | + }).then(res => { | |
592 | + | |
593 | + if (res.data.code == 0) { | |
594 | + promcardbuynum = res.data.data.promcardbuynum; | |
595 | + let canBuyNum = act_details.buy_limit - promcardbuynum; // 自己还可购买的数量c | |
596 | + | |
597 | + if (canBuyNum < qty) { | |
598 | + wx.showModal({ | |
599 | + title: '提示', | |
600 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | |
601 | + showCancel: false, | |
602 | + }); | |
603 | + flag = false; | |
604 | + } | |
605 | + } | |
606 | + }) | |
607 | + } | |
608 | + | |
609 | + }; | |
610 | + | |
611 | + if (it.prom_type == 6) { | |
612 | + let act_details = null; | |
613 | + let redis_num = 0; | |
614 | + let promcardbuynum = 0; | |
615 | + let qty = it.qty; | |
616 | + | |
617 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + store_id + "/" + it.prom_id, {}).then(res => { | |
618 | + | |
619 | + if (res.data.code == 0) { | |
620 | + | |
621 | + act_details = res.data.data; | |
622 | + | |
623 | + if (act_details.is_end == 1) { | |
624 | + wx.showModal({ | |
625 | + title: '提示', | |
626 | + content: '活动已结束,无法支付,请取消订单!', | |
627 | + showCancel: false, | |
628 | + }); | |
629 | + flag = false; | |
630 | + return false; | |
631 | + } | |
632 | + | |
633 | + if (act_details.id != it.prom_id) { | |
634 | + wx.showModal({ | |
635 | + title: '提示', | |
636 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
637 | + showCancel: false, | |
638 | + }); | |
639 | + flag = false; | |
640 | + return false; | |
641 | + } | |
642 | + | |
643 | + var t_now = ut.gettimestamp(); | |
644 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
645 | + wx.showModal({ | |
646 | + title: '提示', | |
647 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
648 | + showCancel: false, | |
649 | + }); | |
650 | + flag = false; | |
651 | + return false; | |
652 | + } | |
653 | + | |
654 | + }; | |
655 | + }); | |
656 | + | |
657 | + if(act_details.buy_limit>0){ | |
658 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
659 | + data: { | |
660 | + store_id: store_id, | |
661 | + user_id: user_id, | |
662 | + card_id: it.card_id, | |
663 | + prom_type: it.prom_type, | |
664 | + prom_id: it.prom_id, | |
665 | + } | |
666 | + }).then(res => { | |
667 | + if (res.data.code == 0) { | |
668 | + console.log('已经购买的数量:', res.data.data); | |
669 | + promcardbuynum = res.data.data.promcardbuynum; | |
670 | + } | |
671 | + }) | |
672 | + let limited = act_details.buy_limit; // 限购数量a | |
673 | + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c | |
674 | + | |
675 | + if (canBuyNum < qty ) { | |
676 | + wx.showModal({ | |
677 | + title: '提示', | |
678 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | |
679 | + showCancel: false, | |
680 | + }); | |
681 | + flag = false; | |
682 | + } | |
683 | + } | |
684 | + pt_act=act_details; | |
685 | + } | |
686 | + } | |
687 | + | |
688 | + if (flag) { | |
689 | + t_pay.set_pay_url("/api/weshop/order/pay/createRechargeOrder"); | |
690 | + t_pay.pay({ | |
691 | + parentSn: order_sn, | |
692 | + store_id: store_id | |
693 | + }, function () { | |
694 | + app.showWarning('支付成功'); | |
695 | + | |
696 | + if(pt_act.is_zsorder==2){ | |
697 | + //--如果商家团的时候--- | |
698 | + getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { | |
699 | + data: {orderSn:order_sn,storeId:os.stoid } | |
700 | + }) | |
701 | + } | |
702 | + | |
703 | + setTimeout(function () { | |
704 | + wx.reLaunch({ | |
705 | + url: "/pages/payment/pay_success/pay_success?card=1&order_id=" + order_id, | |
706 | + }) | |
707 | + }, 1000) | |
708 | + | |
709 | + }, function (e) { | |
710 | + th.data.is_summit_ing = 0; | |
711 | + wx.showToast({ | |
712 | + title: e, | |
713 | + icon: 'none', | |
714 | + duration: 2000 | |
715 | + }); | |
716 | + }) | |
717 | + }else{ | |
718 | + this.data.is_summit_ing=0; | |
719 | + } | |
720 | + | |
570 | 721 | }, |
571 | 722 | |
572 | 723 | //-- 支付尾款 -- | ... | ... |
pages/goods/goodsInfo/goodsInfo.wxss
pages/user/order_list/order_list.js
... | ... | @@ -1217,7 +1217,8 @@ Page({ |
1217 | 1217 | success: function (t) { |
1218 | 1218 | th.setData({ paying: 0 }); |
1219 | 1219 | if (t.data.code == 0) { |
1220 | - th.onload(); | |
1220 | + th.data.orderList.splice(o_index, 1); | |
1221 | + th.setData({ orderList: th.data.orderList }); | |
1221 | 1222 | } else { |
1222 | 1223 | getApp().confirmBox(t.data.msg + "请您取消该订单"); |
1223 | 1224 | } |
... | ... | @@ -1239,6 +1240,15 @@ Page({ |
1239 | 1240 | wx.showToast({ title: '支付成功' }) |
1240 | 1241 | th.data.orderList.splice(o_index, 1); |
1241 | 1242 | th.setData({ orderList: th.data.orderList }); |
1243 | + | |
1244 | + //商家团支付成功后,要让他的团能够建立或者参与 | |
1245 | + if(e.is_zsorder==2){ | |
1246 | + //--如果商家团的时候--- | |
1247 | + getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { | |
1248 | + data: {orderSn:e.order_sn,storeId:os.stoid } | |
1249 | + }) | |
1250 | + } | |
1251 | + | |
1242 | 1252 | }, function () { |
1243 | 1253 | th.setData({ paying: 0 }); |
1244 | 1254 | }, os.stoid, 1); |
... | ... | @@ -2470,19 +2480,23 @@ Page({ |
2470 | 2480 | // 卡项订单 - 立即支付 |
2471 | 2481 | pay: async function (e) { |
2472 | 2482 | let th=this; |
2483 | + | |
2484 | + if(th.data.ser_paying) return false; | |
2485 | + th.data.ser_paying=1; | |
2486 | + | |
2473 | 2487 | let index = e.currentTarget.dataset.index; |
2474 | 2488 | let item = this.data.cardList[index]; |
2475 | 2489 | let order_sn = item.order_sn; |
2476 | 2490 | let order_id = item.order_id; |
2477 | 2491 | let store_id = app.globalData.setting.stoid; |
2478 | 2492 | let user_id = oo.user_id; |
2479 | - let flag = true; | |
2480 | - | |
2481 | 2493 | |
2494 | + let flag = true; | |
2482 | 2495 | // 如果是普通购买或单独购买,不用判断 |
2483 | 2496 | // 如果是秒杀购买:1、判断活动是否变化;2、是否超出限购 |
2484 | - | |
2485 | 2497 | let list = item.list; |
2498 | + var pt_act=null; //-- 拼团活动的优化 -- | |
2499 | + | |
2486 | 2500 | for (const it of list) { |
2487 | 2501 | if (it.prom_type == 1) { |
2488 | 2502 | let act_details = null; |
... | ... | @@ -2492,9 +2506,8 @@ Page({ |
2492 | 2506 | |
2493 | 2507 | |
2494 | 2508 | await getApp().request.promiseGet('/api/ms/flash_sale/getNew/' + store_id + '/' + user_id + '/' + it.prom_id, {}).then(res => { |
2495 | - console.log('11111111====>>>'); | |
2509 | + | |
2496 | 2510 | if (res.data.code == 0) { |
2497 | - console.log('当前的秒杀活动信息:', res.data.data); | |
2498 | 2511 | act_details = res.data.data; |
2499 | 2512 | if (act_details.is_end == 1) { |
2500 | 2513 | wx.showModal({ |
... | ... | @@ -2514,108 +2527,127 @@ Page({ |
2514 | 2527 | flag = false; |
2515 | 2528 | return false; |
2516 | 2529 | }; |
2517 | - }; | |
2518 | - }); | |
2519 | 2530 | |
2520 | - await getApp().request.promiseGet('/api/weshop/activitylist/getActLen/' + store_id + '/' + it.prom_type + '/' + it.prom_id, { | |
2521 | - 1: 1 | |
2522 | - }).then(res => { | |
2523 | - console.log('222222222====>>>'); | |
2524 | - if (res.data.code == 0) { | |
2525 | - // 当前可以购买的数量 | |
2526 | - console.log('redis当前可以购买的数量:', res.data.data); | |
2527 | - redis_num = res.data.data; | |
2528 | - // if(redis_num <=0) { | |
2529 | - // wx.showModal({ | |
2530 | - // title: '提示', | |
2531 | - // content: '活动库存不足,无法支付,请取消订单!', | |
2532 | - // showCancel: false, | |
2533 | - // }); | |
2534 | - // // flag = false; | |
2535 | - // return true; | |
2536 | - // }; | |
2537 | - }; | |
2538 | - }); | |
2539 | 2531 | |
2540 | - await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
2541 | - data: { | |
2542 | - store_id: store_id, | |
2543 | - user_id: user_id, | |
2544 | - card_id: it.card_id, | |
2545 | - prom_type: it.prom_type, | |
2546 | - prom_id: it.prom_id, | |
2532 | + var t_now = ut.gettimestamp(); | |
2533 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
2534 | + wx.showModal({ | |
2535 | + title: '提示', | |
2536 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
2537 | + showCancel: false, | |
2538 | + }); | |
2539 | + flag = false; | |
2540 | + return false; | |
2541 | + } | |
2542 | + | |
2547 | 2543 | } |
2548 | - }).then(res => { | |
2549 | - console.log('333333333====>>>'); | |
2550 | - if (res.data.code == 0) { | |
2551 | - console.log('已经购买的数量:', res.data.data); | |
2552 | - promcardbuynum = res.data.data.promcardbuynum; | |
2544 | + }); | |
2553 | 2545 | |
2546 | + if(act_details.buy_limit>0 && flag){ | |
2547 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
2548 | + data: { | |
2549 | + store_id: store_id, | |
2550 | + user_id: user_id, | |
2551 | + card_id: it.card_id, | |
2552 | + prom_type: it.prom_type, | |
2553 | + prom_id: it.prom_id, | |
2554 | + } | |
2555 | + }).then(res => { | |
2556 | + if (res.data.code == 0) { | |
2557 | + promcardbuynum = res.data.data.promcardbuynum; | |
2558 | + let canBuyNum = act_details.buy_limit - promcardbuynum; // 自己还可购买的数量c | |
2559 | + | |
2560 | + if (canBuyNum < qty) { | |
2561 | + wx.showModal({ | |
2562 | + title: '提示', | |
2563 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | |
2564 | + showCancel: false, | |
2565 | + }); | |
2566 | + flag = false; | |
2567 | + } | |
2568 | + } | |
2569 | + }) | |
2570 | + } | |
2554 | 2571 | |
2555 | - let limited = act_details.buy_limit; // 限购数量a | |
2556 | - let buyedNum = promcardbuynum; // 自己已经购买的数量b | |
2557 | - let canBuyNum = limited - buyedNum; // 自己还可购买的数量c | |
2572 | + }; | |
2558 | 2573 | |
2574 | + if (it.prom_type == 6) { | |
2575 | + let act_details = null; | |
2576 | + let redis_num = 0; | |
2577 | + let promcardbuynum = 0; | |
2578 | + let qty = it.qty; | |
2579 | + | |
2580 | + await getApp().request.promiseGet("/api/weshop/teamlist/get/" + store_id + "/" + it.prom_id, {}).then(res => { | |
2581 | + | |
2582 | + if (res.data.code == 0) { | |
2583 | + | |
2584 | + act_details = res.data.data; | |
2559 | 2585 | |
2560 | - if (canBuyNum <= 0) { | |
2586 | + if (act_details.is_end == 1) { | |
2561 | 2587 | wx.showModal({ |
2562 | 2588 | title: '提示', |
2563 | - content: '您已超出活动限购数量,无法支付,请取消订单!', | |
2589 | + content: '活动已结束,无法支付,请取消订单!', | |
2564 | 2590 | showCancel: false, |
2565 | 2591 | }); |
2566 | 2592 | flag = false; |
2567 | 2593 | return false; |
2568 | - }; | |
2569 | - | |
2570 | - if (limited > redis_num) { | |
2571 | - if (canBuyNum <= redis_num) { | |
2572 | - if (qty > canBuyNum) { | |
2573 | - wx.showModal({ | |
2574 | - title: '提示', | |
2575 | - content: '您已超出活动限购数量,无法支付,请取消订单!', | |
2576 | - showCancel: false, | |
2577 | - }); | |
2578 | - flag = false; | |
2579 | - return false; | |
2580 | - }; | |
2581 | - | |
2582 | - }; | |
2583 | - | |
2584 | - if (canBuyNum > redis_num) { | |
2585 | - if (qty > redis_num) { | |
2586 | - wx.showModal({ | |
2587 | - title: '提示', | |
2588 | - content: '活动库存不足,无法支付,请取消订单!', | |
2589 | - showCancel: false, | |
2590 | - }); | |
2591 | - flag = false; | |
2592 | - return false; | |
2593 | - }; | |
2594 | + } | |
2594 | 2595 | |
2595 | - }; | |
2596 | - }; | |
2596 | + if (act_details.id != it.prom_id) { | |
2597 | + wx.showModal({ | |
2598 | + title: '提示', | |
2599 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
2600 | + showCancel: false, | |
2601 | + }); | |
2602 | + flag = false; | |
2603 | + return false; | |
2604 | + } | |
2597 | 2605 | |
2598 | - if (limited <= redis_num) { | |
2599 | - if (qty > canBuyNum) { | |
2600 | - wx.showModal({ | |
2601 | - title: '提示', | |
2602 | - content: '您已超出活动限购数量,无法支付,请取消订单!', | |
2603 | - showCancel: false, | |
2604 | - }); | |
2605 | - flag = false; | |
2606 | - return false; | |
2607 | - }; | |
2608 | - }; | |
2609 | - }; | |
2606 | + var t_now = ut.gettimestamp(); | |
2607 | + if (act_details.is_end == 1 || act_details.start_time > t_now || act_details.end_time < t_now) { | |
2608 | + wx.showModal({ | |
2609 | + title: '提示', | |
2610 | + content: '活动发生了变化,无法支付,请取消订单,重新购买!', | |
2611 | + showCancel: false, | |
2612 | + }); | |
2613 | + flag = false; | |
2614 | + return false; | |
2615 | + } | |
2616 | + } | |
2610 | 2617 | }); |
2611 | 2618 | |
2612 | - }; | |
2613 | - | |
2614 | - }; | |
2619 | + if(act_details.buy_limit>0 && flag){ | |
2620 | + await getApp().request.promiseGet("/api/weshop/rechargeServicelist/getUserBuyGoodsNum", { | |
2621 | + data: { | |
2622 | + store_id: store_id, | |
2623 | + user_id: user_id, | |
2624 | + card_id: it.card_id, | |
2625 | + prom_type: it.prom_type, | |
2626 | + prom_id: it.prom_id, | |
2627 | + } | |
2628 | + }).then(res => { | |
2629 | + if (res.data.code == 0) { | |
2630 | + console.log('已经购买的数量:', res.data.data); | |
2631 | + promcardbuynum = res.data.data.promcardbuynum; | |
2632 | + } | |
2633 | + }) | |
2634 | + let limited = act_details.buy_limit; // 限购数量a | |
2635 | + let canBuyNum = limited - promcardbuynum; // 自己还可购买的数量c | |
2636 | + | |
2637 | + if (canBuyNum < qty ) { | |
2638 | + wx.showModal({ | |
2639 | + title: '提示', | |
2640 | + content: '您已超出活动限购数量,无法支付,请取消订单!', | |
2641 | + showCancel: false, | |
2642 | + }); | |
2643 | + flag = false; | |
2644 | + } | |
2645 | + } | |
2646 | + pt_act=act_details; | |
2615 | 2647 | |
2616 | - if(th.data.ser_paying) return false; | |
2617 | - th.data.ser_paying=1; | |
2648 | + } | |
2618 | 2649 | |
2650 | + } | |
2619 | 2651 | |
2620 | 2652 | if (flag) { |
2621 | 2653 | |
... | ... | @@ -2624,12 +2656,24 @@ Page({ |
2624 | 2656 | parentSn: order_sn, |
2625 | 2657 | store_id: store_id |
2626 | 2658 | }, function () { |
2627 | - th.data.ser_paying=0; | |
2628 | - wx.showToast({ | |
2629 | - title: '支付成功', | |
2630 | - icon:'success', | |
2631 | - duration: 2000 | |
2632 | - }); | |
2659 | + th.data.ser_paying=0; | |
2660 | + wx.showToast({ | |
2661 | + title: '支付成功', | |
2662 | + icon:'success', | |
2663 | + duration: 2000 | |
2664 | + }); | |
2665 | + | |
2666 | + if(pt_act.is_zsorder==2){ | |
2667 | + //--如果商家团的时候--- | |
2668 | + getApp().request.promisePost("/api/weshop/order/pay/vipAutoTuan", { | |
2669 | + data: {orderSn:order_sn,storeId:os.stoid } | |
2670 | + }) | |
2671 | + } | |
2672 | + | |
2673 | + th.data.cardList.splice(index, 1); | |
2674 | + th.setData({ orderList: th.data.cardList }); | |
2675 | + | |
2676 | + | |
2633 | 2677 | }, function (e) { |
2634 | 2678 | th.data.ser_paying=0; |
2635 | 2679 | wx.showToast({ |
... | ... | @@ -2660,7 +2704,9 @@ Page({ |
2660 | 2704 | // }); |
2661 | 2705 | // // } |
2662 | 2706 | // }); |
2663 | - }; | |
2707 | + }else { | |
2708 | + th.data.ser_paying=0; | |
2709 | + } | |
2664 | 2710 | |
2665 | 2711 | }, |
2666 | 2712 | ... | ... |
pages/user/order_list/order_list.wxml
... | ... | @@ -334,12 +334,16 @@ |
334 | 334 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" |
335 | 335 | data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> |
336 | 336 | </view> |
337 | - <view wx:if="{{item.order_status == 3}}" class="c-a9" class="flex-center">已取消 | |
337 | + | |
338 | + | |
339 | + <!-- 要判断支付尾款失败 --> | |
340 | + <view wx:if="{{item.order_status == 3 && item.pt_status!=6}}" class="c-a9" class="flex-center">已取消 | |
338 | 341 | <view class="lin"></view> |
339 | 342 | <image src="{{iurl}}miniapp/images/trash.png" bindtap="deleteSerOrderData" data-index="{{index}}" |
340 | 343 | data-orderid="{{item.order_id}}" data-ordersn="{{item.order_sn}}"></image> |
341 | 344 | </view> |
342 | 345 | <view wx:if="{{item.order_status == 5}}">已作废</view> |
346 | + <view wx:if="{{item.pt_status==6}}"><text style="font-size: 26rpx;">支付尾款失败</text></view> | |
343 | 347 | </view> |
344 | 348 | </view> |
345 | 349 | ... | ... |