fix: 更新新闻模块
This commit is contained in:
parent
41247b7770
commit
b03f586bf0
|
@ -123,6 +123,7 @@
|
||||||
//获取链接携带的参数
|
//获取链接携带的参数
|
||||||
let linkId = getQueryString('id');
|
let linkId = getQueryString('id');
|
||||||
let keyCode = getQueryString('key');
|
let keyCode = getQueryString('key');
|
||||||
|
|
||||||
if (!linkId) {//地址栏无携带id
|
if (!linkId) {//地址栏无携带id
|
||||||
let path = window.location.pathname;
|
let path = window.location.pathname;
|
||||||
let parmas = path.split('/');
|
let parmas = path.split('/');
|
||||||
|
@ -256,7 +257,6 @@
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (type) {
|
if (type) {
|
||||||
// window.location.replace(wxauth_url);
|
|
||||||
locationReplace(wxauth_url);
|
locationReplace(wxauth_url);
|
||||||
} else {
|
} else {
|
||||||
window.location.href = wxauth_url;
|
window.location.href = wxauth_url;
|
||||||
|
@ -323,8 +323,8 @@
|
||||||
// 第四步:是否需要记录 当前页面
|
// 第四步:是否需要记录 当前页面
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (type) {
|
if (type) {
|
||||||
locationReplace(wxauth_url);
|
|
||||||
// window.location.replace(wxauth_url);
|
// window.location.replace(wxauth_url);
|
||||||
|
locationReplace(wxauth_url);
|
||||||
} else {
|
} else {
|
||||||
window.location.href = wxauth_url;
|
window.location.href = wxauth_url;
|
||||||
}
|
}
|
||||||
|
|
2
libs.js
2
libs.js
|
@ -25,7 +25,7 @@ const settlementFun = (token, settlementType) => {
|
||||||
|
|
||||||
// 兼容IOS 返回
|
// 兼容IOS 返回
|
||||||
const locationReplace = (url) => {
|
const locationReplace = (url) => {
|
||||||
if (history.replaceState) {
|
if (history && history.replaceState) {
|
||||||
history.replaceState(null, document.title, url);
|
history.replaceState(null, document.title, url);
|
||||||
history.go(0);
|
history.go(0);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue