From 985769440efe30cca462da4f08254001bf9db952 Mon Sep 17 00:00:00 2001
From: hwh <332078369@qq.com>
Date: 星期二, 14 一月 2025 16:50:40 +0800
Subject: [PATCH] 登录后页面显示调整
---
Pda/View/login.html | 2 +-
Pda/js/public.js | 3 +++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/Pda/View/login.html b/Pda/View/login.html
index 2693d23..8a815e9 100644
--- a/Pda/View/login.html
+++ b/Pda/View/login.html
@@ -200,7 +200,7 @@
icon: 1,
time: 500 //2绉掑叧闂紙濡傛灉涓嶉厤缃紝榛樿鏄�3绉掞級
}, function () {
- $.cookie('token', res.data);
+ $.cookie('token', res.data,{ path: '/' });
//鍥炶皟
location.href="/View/index.html";
});
diff --git a/Pda/js/public.js b/Pda/js/public.js
index 5217d3a..345f420 100644
--- a/Pda/js/public.js
+++ b/Pda/js/public.js
@@ -132,6 +132,9 @@
}
function isTokenExpired(token) {
+ if(token==undefined||token==''){
+ return true;
+ }
const tokenParts = token.split('.');
if (tokenParts.length !== 3) {
return true; // JWT 鏍煎紡涓嶆纭�
--
Gitblit v1.8.0