Merge branch 'master-500-dev' of http://192.168.1.136:82/monitor_v3/hg-monitor-w…
…eb into master-500-dev-lushangqing
Showing
2 changed files
with
28 additions
and
5 deletions
@@ -118,6 +118,8 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -118,6 +118,8 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
118 | } | 118 | } |
119 | //加载右下角弹窗 | 119 | //加载右下角弹窗 |
120 | loadRightBottomTips(); | 120 | loadRightBottomTips(); |
121 | + //长期登录账户自动刷新 | ||
122 | + getForeverUser(); | ||
121 | 123 | ||
122 | //加载业务信息 | 124 | //加载业务信息 |
123 | function loadBizInfo() { | 125 | function loadBizInfo() { |
@@ -2025,6 +2027,26 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | @@ -2025,6 +2027,26 @@ layui.define(['common', 'swiper', 'admin', 'commonDetail', 'mxClient', 'sessions | ||
2025 | } | 2027 | } |
2026 | }); | 2028 | }); |
2027 | } | 2029 | } |
2030 | + function getForeverUser(){ | ||
2031 | + admin.req({ | ||
2032 | + url: common.domainName + "/api-user/users/getForeverUser", | ||
2033 | + type: "get", | ||
2034 | + success: function (res) { | ||
2035 | + if (res.success) { | ||
2036 | + var lgn = localStorage.getItem("lgn"); | ||
2037 | + if (res.str.indexOf(lgn) != -1) { | ||
2038 | + refresh(); | ||
2039 | + } | ||
2040 | + } | ||
2041 | + } | ||
2042 | + }); | ||
2043 | + } | ||
2044 | + function refresh(){ | ||
2045 | + setInterval(function (){ | ||
2046 | + loadBizInfo(); | ||
2047 | + loadResTypeInfo(); | ||
2048 | + },60000); | ||
2049 | + } | ||
2028 | 2050 | ||
2029 | 2051 | ||
2030 | }); | 2052 | }); |
@@ -152,11 +152,12 @@ layui.define(['laytpl', 'layer'], function (exports) { | @@ -152,11 +152,12 @@ layui.define(['laytpl', 'layer'], function (exports) { | ||
152 | icon: 7, time: 5000 | 152 | icon: 7, time: 5000 |
153 | }); | 153 | }); |
154 | } else { | 154 | } else { |
155 | - var errorMsg = [ | ||
156 | - '请求异常,请重试<br><cite>错误信息:</cite>' + code | ||
157 | - , debug() | ||
158 | - ].join(''); | ||
159 | - view.error(errorMsg); | 155 | + // var errorMsg = [ |
156 | + // '请求异常,请重试<br><cite>错误信息:</cite>' + code | ||
157 | + // , debug() | ||
158 | + // ].join(''); | ||
159 | + // view.error(errorMsg); | ||
160 | + console.error(window.top.location.hash, debug()) | ||
160 | } | 161 | } |
161 | typeof error === 'function' && error(e, code); | 162 | typeof error === 'function' && error(e, code); |
162 | } | 163 | } |
-
Please register or login to post a comment