From eefe6404e59cb9b80bd13abf3d9d43dafe5a3740 Mon Sep 17 00:00:00 2001 From: modendeveloper Date: Sat, 1 Mar 2025 16:13:23 +0800 Subject: [PATCH] =?UTF-8?q?Fix=EF=BC=9A=E8=AE=A2=E5=8D=95=E5=8F=96?= =?UTF-8?q?=E6=B6=88=E6=94=AF=E4=BB=98=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkg_user/views/gift/gift.vue | 21 +++++++--- pkg_user/views/giftList.vue | 76 ++++++++++++++++++++++++++++++++++-- 2 files changed, 87 insertions(+), 10 deletions(-) diff --git a/pkg_user/views/gift/gift.vue b/pkg_user/views/gift/gift.vue index a622b77..75bd6f3 100644 --- a/pkg_user/views/gift/gift.vue +++ b/pkg_user/views/gift/gift.vue @@ -324,7 +324,10 @@ export default { } getGiftCardSendOrder(this.orderKey, params).then(res => { uni.hideLoading(); + const data = res.data; + this.giftKey = data.giftCard.code; + this.orderId = data.result.orderId || '' switch (data.status) { case "ORDER_EXIST": case "EXTEND_ORDER": @@ -353,8 +356,6 @@ export default { duration: 2000 }); this.isPayOk = true; - this.giftKey = data.giftCard.code; - this.orderId = data.result.orderId || '' break; case "WECHAT_H5_PAY": // H5支付 @@ -365,16 +366,24 @@ export default { break; case "WECHAT_PAY": // 小程序支付 - weappPay(data.result.jsConfig).finally(() => { + weappPay(data.result.jsConfig).then((e) => { uni.showToast({ title: res.msg, icon: "none", duration: 2000 }); this.isPayOk = true; - this.giftKey = data.giftCard.code; - this.orderId = data.result.orderId || '' - }); + + }).catch(err => { + this.makeAgain() + uni.showToast({ + title: '支付取消,请在我的礼品卡中完成支付', + icon: "none", + duration: 3000 + }); + }).finally(() => { + + }) break; case "WECHAT_APP_PAY": diff --git a/pkg_user/views/giftList.vue b/pkg_user/views/giftList.vue index babdd57..6dcd7eb 100644 --- a/pkg_user/views/giftList.vue +++ b/pkg_user/views/giftList.vue @@ -55,6 +55,18 @@ 赠言:{{ item.message || '' }} +