fix: onPageNotFound 兜底防空页崩溃 + 首页/记录页接入 i18n(语言切换覆盖全部3个tab)

这个提交包含在:
Guoguo
2026-07-19 05:31:19 -07:00
父节点 8e11b2da10
当前提交 28c711cd00
修改 8 个文件,包含 125 行新增32 行删除
+9
查看文件
@@ -18,6 +18,15 @@ App({
this.checkLogin()
},
// Safety net: if the framework ever tries to open an unknown/empty route
// (e.g. a stale page stack after the pages list changed), fall back to home
// instead of surfacing a hard "page not found" crash.
onPageNotFound: function (res) {
if (res && res.isEntryPage) {
wx.reLaunch({ url: '/pages/index/index', fail: function () {} })
}
},
checkLogin: function () {
var token = wx.getStorageSync('token')
if (!token) {