fix: 更新新闻模块

This commit is contained in:
zhangds 2024-05-06 17:38:59 +08:00
parent 41247b7770
commit b03f586bf0
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}

View File

@ -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 {