sass警告

This commit is contained in:
2026-06-02 14:21:13 +08:00
parent dde72be9de
commit 557a6f30f2
19 changed files with 353 additions and 48 deletions
-14
View File
@@ -1,14 +0,0 @@
/**
* 从 document.cookie 中提取指定 name 的值
*/
export function getCookie(name: string): string | null {
const match = document.cookie.match(new RegExp(`(?:^|;\\s*)${name}=([^;]*)`))
return match ? decodeURIComponent(match[1]) : null
}
/**
* 判断是否已登录 — 通过 Cookie 中是否存在 Token 来判断
*/
export function isLoggedIn(): boolean {
return !!getCookie('Token')
}