From 33eb95f12081d4a02bbff69d3a9aba1acf8c668a Mon Sep 17 00:00:00 2001 From: thinkgem Date: Tue, 12 Mar 2024 13:20:44 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E8=B6=85=E6=97=B6=E5=90=8E?= =?UTF-8?q?=E4=B8=8D=E5=86=8D=E7=BB=9F=E8=AE=A1=E5=9C=A8=E7=BA=BF=E4=BA=BA?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/views/include/sysIndex/topMenuOnline.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html b/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html index d4d5fad3..a10b178f 100644 --- a/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html +++ b/modules/core/src/main/resources/views/include/sysIndex/topMenuOnline.html @@ -7,11 +7,16 @@ function refreshOnlineCount(){ $.get('${ctx}/sys/online/count?__notUpdateSession=true&__t=' + new Date().getTime(), function(data){ + if (!(data && data.result != 'login')){ + if (window.rocInt) { + clearInterval(window.rocInt); + } + } try{$('#onlineCount').html(Number(data))}catch(e){} }) } refreshOnlineCount(); // 先执行一次 - setInterval(refreshOnlineCount, 180000); // 3分钟执行一次 + window.rocInt = setInterval(refreshOnlineCount, 180000); // 3分钟执行一次 $(function(){$('#btnOnline').tooltip()}); \ No newline at end of file