diff --git a/hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js b/hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js index 5793f72..687151d 100644 --- a/hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js +++ b/hg-monitor-web-base/src/main/resources/static/src/controller/main-biz-card.js @@ -118,6 +118,8 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions } //加载右下角弹窗 loadRightBottomTips(); + //长期登录账户自动刷新 + getForeverUser(); //加载业务信息 function loadBizInfo() { @@ -2025,6 +2027,26 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions } }); } + function getForeverUser(){ + admin.req({ + url: common.domainName + "/api-user/users/getForeverUser", + type: "get", + success: function (res) { + if (res.success) { + var lgn = localStorage.getItem("lgn"); + if (res.str.indexOf(lgn) != -1) { + refresh(); + } + } + } + }); + } + function refresh(){ + setInterval(function (){ + loadBizInfo(); + loadResTypeInfo(); + },60000); + } }); diff --git a/hg-monitor-web-base/src/main/resources/static/src/lib/view.js b/hg-monitor-web-base/src/main/resources/static/src/lib/view.js index 439eff7..cd4f5d3 100644 --- a/hg-monitor-web-base/src/main/resources/static/src/lib/view.js +++ b/hg-monitor-web-base/src/main/resources/static/src/lib/view.js @@ -152,11 +152,12 @@ layui.define(['laytpl', 'layer'], function (exports) { icon: 7, time: 5000 }); } else { - var errorMsg = [ - '请求异常,请重试<br><cite>错误信息:</cite>' + code - , debug() - ].join(''); - view.error(errorMsg); + // var errorMsg = [ + // '请求异常,请重试<br><cite>错误信息:</cite>' + code + // , debug() + // ].join(''); + // view.error(errorMsg); + console.error(window.top.location.hash, debug()) } typeof error === 'function' && error(e, code); }