WholeProcessPlatform/frontend/src/utils/auth.ts

15 lines
290 B
TypeScript
Raw Normal View History

2026-03-25 10:02:19 +08:00
import Cookies from 'js-cookie';
const TokenKey = 'token';
2026-04-21 14:42:10 +08:00
const PathKey = 'path';
2026-03-25 10:02:19 +08:00
export function getToken() {
return Cookies.get(TokenKey);
}
export function setToken(token: any) {
Cookies.set(TokenKey, token);
}
export function removeToken() {
return Cookies.remove(TokenKey);
2026-04-21 14:42:10 +08:00
}