Step F1:前端工程骨架 & 登录鉴权
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
const TOKEN_KEY = "ctms_token";
|
||||
|
||||
export const getToken = (): string | null => localStorage.getItem(TOKEN_KEY);
|
||||
|
||||
export const setToken = (token: string): void => {
|
||||
localStorage.setItem(TOKEN_KEY, token);
|
||||
};
|
||||
|
||||
export const clearToken = (): void => {
|
||||
localStorage.removeItem(TOKEN_KEY);
|
||||
};
|
||||
Reference in New Issue
Block a user