qsh 1 month ago
parent e65984d2e8
commit 95a198eab1
  1. 12
      src/permission.js

@ -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)

Loading…
Cancel
Save