Merge pull request #7 from imageslr/patch-1
fix: 调用next(...)重定向不会触发router.afterEach钩子 Former-commit-id: d5cca9eae0353df214800d5fcf71ec8c6109d893
This commit is contained in:
@@ -43,6 +43,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
next({
|
next({
|
||||||
name: 'login'
|
name: 'login'
|
||||||
})
|
})
|
||||||
|
NProgress.done() // next(...)重定向不会触发router.afterEach钩子,需要手动hack一下
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 不需要身份校验 直接通过
|
// 不需要身份校验 直接通过
|
||||||
|
|||||||
Reference in New Issue
Block a user