fix(mpuniapp): 支持根路径登录鉴权分发与业务端到端操作闭环

这个提交包含在:
wikiboss
2026-09-21 11:35:36 +08:00
父节点 73e4283201
当前提交 603f3d3964
共有 6 个文件被更改,包括 66 次插入 和 2 次删除

查看文件

@@ -21,7 +21,7 @@
function routeOwnerHome() : void {
if (getAuthToken() != '') {
uni.switchTab({
url: '/pages/owner/hall/index'
url: '/pages/owner/card/index'
})
return
}
@@ -34,6 +34,18 @@
// #ifdef APP
routeOwnerHome()
// #endif
// #ifdef H5
if (typeof window !== 'undefined') {
const hash = window.location.hash
if (!hash || hash === '#' || hash === '#/' || hash === '') {
if (getAuthToken() != '') {
window.location.hash = '#/pages/owner/card/index'
} else {
window.location.hash = '#/pages/common/login'
}
}
}
// #endif
})
onAppShow((res : OnShowOptions) => {