登录页面init
This commit is contained in:
9
frontend/src/utils/logout/index.ts
Normal file
9
frontend/src/utils/logout/index.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { useUserInfoStore } from '@/stores/user'
|
||||
import { USER_INFO } from '@/constants/storeKey'
|
||||
|
||||
export function clearUserInfo() {
|
||||
const userInfo = useUserInfoStore()
|
||||
userInfo.$reset()
|
||||
// 清除用户信息缓存
|
||||
localStorage.removeItem(USER_INFO)
|
||||
}
|
||||
Reference in New Issue
Block a user