mirror of
https://github.com/itbaima-study/SpringBoot-Vue-Template-Jwt.git
synced 2025-05-18 05:21:14 +08:00
修复过期时间比较BUG
This commit is contained in:
parent
0bc0f5e735
commit
9eff280059
@ -23,7 +23,7 @@ function takeAccessToken() {
|
||||
const str = localStorage.getItem(authItemName) || sessionStorage.getItem(authItemName);
|
||||
if(!str) return null
|
||||
const authObj = JSON.parse(str)
|
||||
if(authObj.expire <= new Date()) {
|
||||
if(new Date(authObj.expire) <= new Date()) {
|
||||
deleteAccessToken()
|
||||
ElMessage.warning("登录状态已过期,请重新登录!")
|
||||
return null
|
||||
|
Loading…
x
Reference in New Issue
Block a user