diff --git a/index.html b/index.html
index a7115bd..4a9a5f4 100644
--- a/index.html
+++ b/index.html
@@ -123,6 +123,7 @@
//获取链接携带的参数
let linkId = getQueryString('id');
let keyCode = getQueryString('key');
+
if (!linkId) {//地址栏无携带id
let path = window.location.pathname;
let parmas = path.split('/');
@@ -256,7 +257,6 @@
}
setTimeout(() => {
if (type) {
- // window.location.replace(wxauth_url);
locationReplace(wxauth_url);
} else {
window.location.href = wxauth_url;
@@ -323,8 +323,8 @@
// 第四步:是否需要记录 当前页面
setTimeout(() => {
if (type) {
- locationReplace(wxauth_url);
// window.location.replace(wxauth_url);
+ locationReplace(wxauth_url);
} else {
window.location.href = wxauth_url;
}
diff --git a/libs.js b/libs.js
index 3e88336..d137d7c 100644
--- a/libs.js
+++ b/libs.js
@@ -25,7 +25,7 @@ const settlementFun = (token, settlementType) => {
// 兼容IOS 返回
const locationReplace = (url) => {
- if (history.replaceState) {
+ if (history && history.replaceState) {
history.replaceState(null, document.title, url);
history.go(0);
} else {