refactor: ♻️ aPI 文件根据模块划分

This commit is contained in:
ray
2024-10-18 22:28:02 +08:00
parent 0cc300a032
commit af460b5dc3
43 changed files with 150 additions and 297 deletions

View File

@@ -8,12 +8,8 @@ function setToken(token: string) {
return localStorage.setItem(TOKEN_KEY, token);
}
function removeToken() {
function clearToken() {
return localStorage.removeItem(TOKEN_KEY);
}
function isLogin(): boolean {
return !!getToken();
}
export { getToken, setToken, removeToken, isLogin };
export { getToken, setToken, clearToken };