From c8ce567e99eab1d55d0bdb84464609c899596bec Mon Sep 17 00:00:00 2001 From: tpingzhang <635929049@qq.com> Date: Tue, 12 Nov 2019 09:52:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E5=B8=81=20ios=20=E5=BE=AE?= =?UTF-8?q?=E4=BF=A1=E6=94=AF=E4=BB=98=20=E8=B7=B3app?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sdk/View/default/Spend/paycallback.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Application/Sdk/View/default/Spend/paycallback.html b/Application/Sdk/View/default/Spend/paycallback.html index f03895f3..5ac411b5 100644 --- a/Application/Sdk/View/default/Spend/paycallback.html +++ b/Application/Sdk/View/default/Spend/paycallback.html @@ -101,6 +101,9 @@ $(function() { 'user_token' : user_token, }, success: function(r) { + var u = navigator.userAgent; + var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 + if (r.payStatus == '1') { if (r.type == "deposit") { confirm("支付成功"); @@ -109,12 +112,19 @@ $(function() { } if (r.type == "deposit") { + if (!isAndroid) { + try { + window.webkit.messageHandlers.exchangeResult.postMessage(1); + } catch(err) { + window.location.href = Scheme+"://1&back"; + } + return ; + } + window.location.href = r.url; } if (r.type == "spend") { - var u = navigator.userAgent; - var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端 if (r.payStatus == '1') { if (isAndroid) { window.txyxsdk.getPayResult('succeed');