update at 2026-02-10 14:10:20

This commit is contained in:
douboer
2026-02-10 14:10:20 +08:00
parent b6742cb13a
commit b43155dd0f
9 changed files with 579 additions and 58 deletions

View File

@@ -1,4 +1,5 @@
const { buildRuntimeConfig } = require('./config/server')
const { bootstrapRoute, checkRouteOnShow } = require('./utils/mp/route-manager')
const runtimeConfig = buildRuntimeConfig()
@@ -8,5 +9,20 @@ App({
apiTimeoutMs: 30000,
fonts: null,
defaultConfig: null,
routeReadyPromise: null,
},
onLaunch() {
this.globalData.routeReadyPromise = bootstrapRoute(this)
.catch((error) => {
console.warn('[app] 路由初始化失败,使用当前配置继续运行:', error)
return null
})
},
onShow() {
checkRouteOnShow(this).catch((error) => {
console.warn('[app] 回前台路由检查失败:', error)
})
},
})