From 5d94239d51f748a8708c0588895e2f7586f5f5e0 Mon Sep 17 00:00:00 2001 From: zhangds Date: Fri, 10 May 2024 09:18:05 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9=20=E9=93=BE=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 1 + libs.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/index.html b/index.html index c842a5d..a24d6ad 100644 --- a/index.html +++ b/index.html @@ -273,6 +273,7 @@ settlementFun(data.token, data.settlement_data.settlement_type); } wxauth_url = `${wxauth_url}?jump=${location.origin}/packkey/bm-index.html`; + } else { // 不是包码 if (this.pageType === 4 || this.pageType === 8) { diff --git a/libs.js b/libs.js index d137d7c..930fecb 100644 --- a/libs.js +++ b/libs.js @@ -25,10 +25,14 @@ const settlementFun = (token, settlementType) => { // 兼容IOS 返回 const locationReplace = (url) => { - if (history && history.replaceState) { - history.replaceState(null, document.title, url); - history.go(0); - } else { + try { + if (history && history.replaceState) { + history.replaceState(null, document.title, url); + history.go(0); + } else { + location.replace(url); + } + } catch { location.replace(url); } };