feat: 将 Sense 登录有效期调整为30天 (#104)

This commit is contained in:
QiuSW
2026-08-17 10:53:20 +08:00
parent 4b135b852b
commit 857ba45541
11 changed files with 80 additions and 15 deletions
+2 -1
View File
@@ -1,13 +1,14 @@
import Cookies from 'js-cookie'
const TokenKey = 'Sense-Admin-Token'
const LoginValidityDays = 30
export function getToken() {
return Cookies.get(TokenKey)
}
export function setToken(token) {
return Cookies.set(TokenKey, token)
return Cookies.set(TokenKey, token, { expires: LoginValidityDays })
}
export function removeToken() {