From f994cf76c5088a5f0e3a1c66022c5b841611e9ae Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Wed, 2 Nov 2022 14:06:23 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E9=A2=84=E7=95=99=E4=BD=8D=E7=BD=AE?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E5=90=8E=E7=BB=AD=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/myOrder.html | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/coupon/myOrder.html b/coupon/myOrder.html index 229b548..f0f89fb 100644 --- a/coupon/myOrder.html +++ b/coupon/myOrder.html @@ -235,7 +235,7 @@ /* 去支付 */ payFunction ({ payType }) { /* payType 1:微信 2:支付宝 */ - /* 后端 微信是5 */ + /* 后端 微信是5 支付宝是1 */ this.active = payType === 2 ? 1 : 5 this.show = false @@ -250,16 +250,16 @@ if (code === 200) { this.getOrderList() - this.payRealFunction() + this.payRealFunction(payType) } }) } else { - this.payRealFunction() + this.payRealFunction(payType) } }, /* 调用支付 */ - payRealFunction () { + payRealFunction (payType) { req.axiosGet(`/key/coupon/createPay/${this.activeOrder.order_number}`, { token: localStorage.getItem('token') }).then(({ code, data, message }) => { if (code === 403) { this.popFunction({ title: '温馨提示', text: message, status: 2, b_text: '我知道了', show: true }) @@ -268,8 +268,11 @@ } /* 跳转链接 */ - if (code === 200) { + /* 支付宝支付 */ + if (code === 200 && payType === 2) { window.location.href = data + } else { /* 微信支付 */ + } }) },