From 5d94b9c6ba1ea31026101f1ab3a793531d5b020b Mon Sep 17 00:00:00 2001 From: Apple <> Date: Tue, 18 Oct 2022 16:09:44 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E5=88=B8=E5=90=8E=E4=BB=B7?= =?UTF-8?q?=E4=B8=BA0=E7=9A=84=EF=BC=8C=E7=82=B9=E5=87=BB=E7=AB=8B?= =?UTF-8?q?=E5=8D=B3=E6=94=AF=E4=BB=98=E7=9B=B4=E6=8E=A5=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=AE=A2=E5=8D=95=EF=BC=8C=E4=B8=8D=E9=9C=80=E8=A6=81=E5=88=B0?= =?UTF-8?q?=E5=BE=AE=E4=BF=A1=E6=88=96=E6=94=AF=E4=BB=98=E5=AE=9D=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/details.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/coupon/details.html b/coupon/details.html index 5f7c6f1..6141f0e 100644 --- a/coupon/details.html +++ b/coupon/details.html @@ -510,7 +510,11 @@ this.payType = payType this.show = false let orderInfo = await this.createdOrder(payType); - this.createdPay(orderInfo.order_number); + if (orderInfo.pay_status==2) {//pay_status 2已支付 + window.location.replace('http://test.86885.cn/paysuccess.html?order_number=' + orderInfo.order_number); + }else{ + this.createdPay(orderInfo.order_number); + } }, //创建优惠券订单 createdOrder (payType) { @@ -543,11 +547,7 @@ createdPay (orderNumber) { req.axiosGet('/key/coupon/createPay/' + orderNumber).then(res => { if (res.code == 200) { - if (res.data.pay_status) {//pay_status 2已支付 - window.location.replace('http://test.86885.cn/paysuccess.html?order_number=' + res.data.order_number); - } else { - this.payWayRun(res.data); - } + this.payWayRun(res.data); } else { this.openErrorDialog(res.message); }