Files
YG_FT_Platform/web/index.html
leokaka1 5be838a74e 1. 修改了跳转逻辑
2. 增加了首页banner栏性能监控
2026-01-21 09:42:38 +08:00

26 lines
826 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<title>跳转中...</title>
</head>
<body>
<p>正在检查登录状态...</p>
<script>
// 会话超时检查5分钟
const SESSION_TIMEOUT = 5 * 60 * 1000; // 5分钟
const loginTime = localStorage.getItem('loginTime');
if (!loginTime || (Date.now() - parseInt(loginTime)) > SESSION_TIMEOUT) {
// 会话过期,跳转登录页
localStorage.removeItem('loginTime');
localStorage.removeItem('username');
window.location.href = 'pages/login.html';
} else {
// 会话有效,跳转主页
localStorage.setItem('loginTime', Date.now());
window.location.href = 'pages/main.html';
}
</script>
</body>
</html>