From 54aaffe148e1d4f83008d245e6c16000fd13be82 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Fri, 14 Oct 2022 11:03:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E5=A4=8D=E3=80=90C=E7=AB=AF?= =?UTF-8?q?=E3=80=91=E3=80=90=E7=AB=8B=E5=87=8F=E9=87=91=E3=80=91=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E7=99=BB=E5=BD=95C=E7=AB=AF=EF=BC=8C=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=94=AF=E4=BB=98=E5=8E=BB?= =?UTF-8?q?=E9=A2=86=E5=8F=96=E7=AB=8B=E5=87=8F=E9=87=91=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- coupon/myOrder.html | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/coupon/myOrder.html b/coupon/myOrder.html index da647c1..59d3399 100644 --- a/coupon/myOrder.html +++ b/coupon/myOrder.html @@ -288,15 +288,6 @@ }, - //支付宝H5跳转 - toLinkAliPay (res) { - let banklink = encodeURIComponent( - window.location.origin + - "/alipay.html?orderNumber=" + res.alipay_order_number - ); - let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + banklink; - window.location.href = link; - }, //领取立减金 receiveFn (res) { @@ -304,12 +295,18 @@ /* 支付宝 */ if (res.goods.entity.channel == 1) { + let bankLink = encodeURIComponent( + window.location.origin + + "/alipay.html?orderNumber=" + res.alipay_order_number + ); + let link = "http://openapi.1688sup.com/alipay/oauth?jump=" + bankLink; + if (ua.indexOf("weixin") > -1) { //在微信内置环境打开,不能唤起支付宝 - this.href = res.redirect_url + this.href = link this.popFunction({ title: '温馨提示', text: `请在其他浏览器打开链接`, status: 2, b_text: '点击复制', show: true }) } else { - this.toLinkAliPay(res); + window.location.href = link; } } @@ -317,11 +314,11 @@ if (res.goods.entity.channel == 2) { if (ua.indexOf("dingtalk") > -1) { //在钉钉内置环境打开,不能唤起微信小程序 - this.href = res.redirect_url + this.href = res.wechat_redirect_url this.popFunction({ title: '温馨提示', text: `请在其他浏览器打开链接`, status: 2, b_text: '点击复制', show: true }) } else { //唤起微信福利官小程序 - window.location.replace(res.redirect_url); + window.location.replace(res.wechat_redirect_url); } } },