feat: 前端优化

This commit is contained in:
2025-12-21 22:24:16 +08:00
parent d3a8ea1964
commit b80de78d7c
36 changed files with 3721 additions and 1205 deletions

View File

@@ -149,7 +149,15 @@ export const useUserStore = defineStore('user', () => {
console.error('清空 token 失败:', e)
}
// 2. 清空用户信息
// 2. 清空用户信息缓存
try {
const { clearUserInfoCache } = await import('@gold/hooks/web/useUserInfo')
clearUserInfoCache()
} catch (e) {
console.error('清除用户信息缓存失败:', e)
}
// 3. 清空用户信息
isLoggedIn.value = false
userId.value = ''
nickname.value = ''
@@ -162,7 +170,7 @@ export const useUserStore = defineStore('user', () => {
vipLevel.value = 0
credits.value = 0
// 3. 删除本地存储的用户数据
// 4. 删除本地存储的用户数据
await remove(STORAGE_KEY)
}