fix
This commit is contained in:
@@ -5,17 +5,19 @@ const whiteList = ['/login']
|
||||
console.log(whiteList)
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
const verify = to.meta?.verify;
|
||||
if (typeof verify === 'function') {
|
||||
const res = verify()
|
||||
if (res === false) {
|
||||
return next(false)
|
||||
} else if (typeof res === 'string') {
|
||||
console.log(res)
|
||||
return next({ path: res })
|
||||
requestAnimationFrame(() => {
|
||||
const verify = to.meta?.verify;
|
||||
if (typeof verify === 'function') {
|
||||
const res = verify()
|
||||
if (res === false) {
|
||||
return next(false)
|
||||
} else if (typeof res === 'string') {
|
||||
console.log(res)
|
||||
return next({ path: res })
|
||||
}
|
||||
}
|
||||
}
|
||||
next()
|
||||
next()
|
||||
})
|
||||
})
|
||||
|
||||
router.afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user