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