[中] fetchUser 401后清除token但不清除user对象 #95
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
问题描述
frontend/src/stores/user.ts 第66-75行,fetchUser() 遇到401时只清除 token 但不清除 user 对象。Store 中残留的 user 对象可能导致 UI 显示已登录用户的旧信息。
涉及文件
修复建议
401时同时清除 token 和 user 对象。
严重程度
中 - 状态不一致