From d07f25c163706ac46a83bd2c63db1e3c52715222 Mon Sep 17 00:00:00 2001
From: zhaowc <526854230@qq.com>
Date: 星期四, 27 三月 2025 15:54:25 +0800
Subject: [PATCH] 解决问题
---
HTML/views/index.html | 37 ++++++++++++++++++++++++++++++++-----
1 files changed, 32 insertions(+), 5 deletions(-)
diff --git a/HTML/views/index.html b/HTML/views/index.html
index ba720fe..e189027 100644
--- a/HTML/views/index.html
+++ b/HTML/views/index.html
@@ -53,7 +53,7 @@
</cite>
</a>
<dl class="layui-nav-child">
- <!-- <dd><a lay-href="set/user/info.html">鍩烘湰璧勬枡</a></dd> -->
+ <dd><a lay-href="set/user/info.html">鍩烘湰璧勬枡</a></dd>
<dd><a lay-href="set/user/password.html" id="changePassword">淇敼瀵嗙爜</a></dd>
<hr>
<dd><a href="Login.html">閫�鍑�</a></dd>
@@ -104,10 +104,12 @@
<iframe src="home/console.html" frameborder="0" class="layadmin-iframe"></iframe>
</div>
</div>
- <div class="layui-footer" style="height: 20px; z-index: 999;">
- <!-- 搴曢儴鍥哄畾鍖哄煙 -->
- <p>鐗堟湰v1.0</p>
- </div>
+ <!--
+ <div class="layui-footer" style="height: 20px; z-index: 999;">
+ <!-- 搴曢儴鍥哄畾鍖哄煙 -->
+ <p>鐗堟湰v1.0</p>
+ </div>
+ -->
<!-- 杈呭姪鍏冪礌锛屼竴鑸敤浜庣Щ鍔ㄨ澶囦笅閬僵 -->
<div class="layadmin-body-shade" layadmin-event="shade"></div>
</div>
@@ -136,6 +138,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