dev_tpm_ui
杨树明 5 years ago
parent 6750fd305f
commit 69f5b5438b

@ -158,6 +158,17 @@
<!-- 在tpi js里加载这3个脚本 -->
<script>
(function() {
if (window.history && window.history.pushState) {
$(window).on('popstate', function () {
window.history.pushState('forward', null, '#');
window.history.forward(1);
window.location.href = window.location.reload();
});
}
window.history.pushState('forward', null, '#'); //在IE中必须得有这两行
window.history.forward(1);
})();
(function() { // Scoping function to avoid globals
var href = location.href;
if(window.location.port === "3007"){

@ -10,21 +10,11 @@ const $ = window.$;
const opens ="79e33abd4b6588941ab7622aed1e67e8";
let timestamp;
let checkSubmitFlg = false;
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") {
@ -237,14 +227,11 @@ export function initAxiosInterceptors(props) {
if (response.data.status === 501) {
notification.open({
message:"提示",
description:response.data.message?response.data.message+"将在1秒钟后刷新页面" : '访问异常请求不合理将在1秒钟后刷新页面',
description:response.data.message || '访问异常,请求不合理',
style: {
zIndex: 99999999
}
})
window.setTimeout(function () {
window.location.reload()
}, 1500);
}

Loading…
Cancel
Save