Merge branch 'master-500-dev-xwx' into 'master-500-dev'
首页-【无】-长期登录账户自动刷新 See merge request !932
Showing
1 changed file
with
22 additions
and
0 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 | }); |
-
Please register or login to post a comment