登录超时后不再统计在线人数
This commit is contained in:
@@ -7,11 +7,16 @@
|
|||||||
function refreshOnlineCount(){
|
function refreshOnlineCount(){
|
||||||
$.get('${ctx}/sys/online/count?__notUpdateSession=true&__t='
|
$.get('${ctx}/sys/online/count?__notUpdateSession=true&__t='
|
||||||
+ new Date().getTime(), function(data){
|
+ new Date().getTime(), function(data){
|
||||||
|
if (!(data && data.result != 'login')){
|
||||||
|
if (window.rocInt) {
|
||||||
|
clearInterval(window.rocInt);
|
||||||
|
}
|
||||||
|
}
|
||||||
try{$('#onlineCount').html(Number(data))}catch(e){}
|
try{$('#onlineCount').html(Number(data))}catch(e){}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
refreshOnlineCount(); // 先执行一次
|
refreshOnlineCount(); // 先执行一次
|
||||||
setInterval(refreshOnlineCount, 180000); // 3分钟执行一次
|
window.rocInt = setInterval(refreshOnlineCount, 180000); // 3分钟执行一次
|
||||||
$(function(){$('#btnOnline').tooltip()});
|
$(function(){$('#btnOnline').tooltip()});
|
||||||
</script>
|
</script>
|
||||||
</li>
|
</li>
|
||||||
Reference in New Issue
Block a user