From ee00e504518145031f3d7e869c41bcbf51c0b79b Mon Sep 17 00:00:00 2001
From: chengsc <Demo@DESKTOP-CPA90BF>
Date: 星期三, 23 十月 2024 18:11:22 +0800
Subject: [PATCH] 修改问题
---
HTML/views/index.html | 25 +++++++++++++++++++++++++
1 files changed, 25 insertions(+), 0 deletions(-)
diff --git a/HTML/views/index.html b/HTML/views/index.html
index ba720fe..13eab3b 100644
--- a/HTML/views/index.html
+++ b/HTML/views/index.html
@@ -136,6 +136,31 @@
}else{
$("#token").text($.cookie('token'));
}
+
+ var lastTime = new Date().getTime();
+ var currentTime = new Date().getTime();
+ var timeOut = 20*60*1000;
+ $(function () {
+ $(document).mouseover(function () {
+ lastTime = new Date().getTime();
+ })
+ });
+ function testTime() {
+ // console.log("璁℃椂锛�"+new Date().getTime());
+ console.log("lastTime锛�"+lastTime);
+ //console.log("currentTime锛�"+currentTime);
+
+ //console.log("lastTime - currentTime锛�"+lastTime - currentTime);
+
+ currentTime = new Date().getTime();
+ if(currentTime - lastTime > timeOut){
+ console.log("瓒呮椂");
+ location.href = "Login.html";
+ }
+ }
+
+ window.setInterval(testTime,1000);
+
var element = layui.element;
var xml = '';
--
Gitblit v1.8.0