This commit is contained in:
qsh
2025-05-23 17:24:13 +08:00
parent e65984d2e8
commit 95a198eab1

View File

@@ -34,9 +34,7 @@ router.beforeEach(async (to, from, next) => {
// next({ path: '/' })
if (to.query?.tenantId && to.query?.appId) {
setApp(to.query.tenantId, to.query.appId)
// setTimeout(() => {
// next({ path: '/' })
// }, 1500)
await waitTime(1500)
}
next({ path: '/' })
} else {
@@ -80,6 +78,14 @@ router.beforeEach(async (to, from, next) => {
}
})
async function waitTime(seconds) {
return new Promise((resolve) => {
setTimeout(() => {
resolve()
}, seconds)
})
}
function setApp(tenantId, appId) {
setTenantId(tenantId)