qsh 4 weeks ago
parent c13e06b0bf
commit 748709783d
  1. 9
      src/permission.js

@ -20,14 +20,6 @@ const whiteList = ['/login', '/social-login', '/auth-redirect', '/bind', '/regis
router.beforeEach(async (to, from, next) => { router.beforeEach(async (to, from, next) => {
start() start()
loadStart() loadStart()
if (getAppId() && to.query?.appId && getAppId() != to.query?.appId) {
removeToken()
cache?.local?.delete('appInfo')
cache?.local?.delete('roleRouters')
cache?.local?.delete('user')
cache?.local?.delete('App_ID')
next(`/login`)
} else {
if (getAccessToken()) { if (getAccessToken()) {
if (to.path === '/login') { if (to.path === '/login') {
next({ path: '/' }) next({ path: '/' })
@ -69,7 +61,6 @@ router.beforeEach(async (to, from, next) => {
// } // }
} }
} }
}
}) })
router.afterEach((to) => { router.afterEach((to) => {

Loading…
Cancel
Save