调整停留报501方案

dev_tpm_ui
杨树明 5 years ago
parent 64ad8a1903
commit 6eebb13501

@ -14,6 +14,17 @@ broadcastChannelOnmessage('refreshPage', () => {
window.location.reload()
})
window.addEventListener('pageshow', function(event) {
if(event.persisted) { // ios 有效, android 和 pc 每次都是 false
window.location.reload();
} else { // ios 除外
if(sessionStorage.getItem('refresh') === 'true') {
window.location.reload();
}
}
sessionStorage.removeItem('refresh');
});
function locationurl(list){
if (window.location.port === "3007") {
@ -224,10 +235,16 @@ export function initAxiosInterceptors(props) {
}
if (response.data.status === 501) {
window.location.reload()
notification.warning({
description:response.data.message || '访问异常,请求不合理',
notification.open({
message:"提示",
description:response.data.message?response.data.message+"将在1秒钟后刷新页面" : '访问异常请求不合理将在1秒钟后刷新页面',
style: {
zIndex: 99999999
}
})
window.setTimeout(function () {
window.location.reload()
}, 1500);
}

Loading…
Cancel
Save