fix(user): 修复退出登录时红点状态未重置的问题
- 在 logout() 函数中添加 unreadMsgCount.value = 0 - 确保用户退出登录后 TabBar 红点正确消失 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Showing
1 changed file
with
1 additions
and
0 deletions
| ... | @@ -186,6 +186,7 @@ export const useUserStore = defineStore('user', () => { | ... | @@ -186,6 +186,7 @@ export const useUserStore = defineStore('user', () => { |
| 186 | userInfo.value = null | 186 | userInfo.value = null |
| 187 | isOpenid.value = false | 187 | isOpenid.value = false |
| 188 | isLoggedIn.value = false | 188 | isLoggedIn.value = false |
| 189 | + unreadMsgCount.value = 0 // 清除未读消息数,隐藏红点 | ||
| 189 | } catch (err) { | 190 | } catch (err) { |
| 190 | console.error('登出失败:', err) | 191 | console.error('登出失败:', err) |
| 191 | } | 192 | } | ... | ... |
-
Please register or login to post a comment