bugfix:loginfiled

This commit is contained in:
2026-09-13 01:27:21 +08:00
parent f897e1a391
commit b1a664a768
9 changed files with 128 additions and 11 deletions
+5 -3
View File
@@ -21,10 +21,12 @@ Component({
lifetimes: {
attached() {
// 先用缓存渲染红点;未登录时不再发请求(否则会批量 401 并触发重定向)
// 首帧渲染流程结束后再更新:先用缓存渲染红点,未登录时不再发请求(否则会批量 401 并触发重定向)
const cached = (wx.getStorageSync(STORAGE_KEYS.UNREAD) as number) || 0
this.setData({ unread: cached })
this.syncUnread()
wx.nextTick(() => {
this.setData({ unread: cached })
this.syncUnread()
})
},
},