feat:聊天页面相关功能优化,提供用户体验感

This commit is contained in:
bujinyuan
2026-04-20 15:40:16 +08:00
parent 0c1540bdee
commit ccfceefdaf
28 changed files with 1402 additions and 62 deletions

View File

@@ -120,6 +120,12 @@ export const useUserStore = defineStore('user', () => {
} catch (e) {
console.warn('登出 API 调用失败,仍然清除本地状态', e)
}
// 清理 chat store 中的私人视图态(语音已播放缓存按 userId 隔离存在 storage
// 此处只重置运行时 state下次登录会按新 userId 加载对应缓存)
try {
const { useChatStore } = await import('@/store/chat')
useChatStore().resetVoicePlayedState()
} catch (_) { /* ignore */ }
token.value = ''
userInfo.value = null
clearAll()