From 1434fe28eb8e43bb8232a1e472404b4354163859 Mon Sep 17 00:00:00 2001 From: liudong <liudong> Date: 星期五, 09 八月 2024 18:27:42 +0800 Subject: [PATCH] 优化知识库页面兼容性 --- src/utils/auth.ts | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/src/utils/auth.ts b/src/utils/auth.ts index c92c3cf..0caf5e8 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -44,4 +44,8 @@ localStorage.setItem(UserResources, info); }; -export { isLogin, getToken, setToken, clearToken,getAuthorization, setAuthorization, getUserInfo, setUserInfo,setUserResources,getUserResources}; +const clearUserResources = () => { + localStorage.removeItem(UserResources); +}; + +export { isLogin, getToken, setToken, clearToken,getAuthorization, setAuthorization, getUserInfo, setUserInfo,setUserResources,getUserResources,clearUserResources}; -- Gitblit v1.8.0