This commit is contained in:
2026-09-13 02:35:32 +08:00
parent 42f9530a59
commit e65d4f5189
4 changed files with 32 additions and 2 deletions
+9
View File
@@ -41,6 +41,15 @@ Page({
redirectToLogin()
return
}
// 首帧渲染未结束就 setData 会触发「Expected updated data but get first rendering data」,
// 整个 webview 渲染失败,用户视觉上仍看到上一个页面(从 login switchTab 过来时表现为
// "卡在登录页")。把首次 onShow 的刷新延迟到下一帧,规避首帧冲突。
if (!(this as any).firstShown) {
;(this as any).firstShown = true
wx.nextTick(() => this.refresh())
return
}
logger.debug(LOG, 'onShow 触发刷新')
this.refresh()
},