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 || '' }} +