This commit is contained in:
qsh
2025-05-23 17:23:49 +08:00
parent 83793b6591
commit 683bfa0d38
2 changed files with 11 additions and 5 deletions

View File

@@ -33,9 +33,7 @@ router.beforeEach(async (to, from, next) => {
if (to.path === '/login') {
if (to.query?.tenantId && to.query?.appId) {
setApp(to.query.tenantId, to.query.appId)
setTimeout(() => {
next({ path: '/' })
}, 1500)
await waitTime(1500)
} else {
next({ path: '/' })
}
@@ -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)