Merge pull request #7 from imageslr/patch-1

fix: 调用next(...)重定向不会触发router.afterEach钩子
Former-commit-id: d5cca9eae0353df214800d5fcf71ec8c6109d893
This commit is contained in:
李杨
2018-11-20 16:38:19 +08:00
committed by GitHub
+1
View File
@@ -43,6 +43,7 @@ router.beforeEach((to, from, next) => {
next({
name: 'login'
})
NProgress.done() // next(...)重定向不会触发router.afterEach钩子,需要手动hack一下
}
} else {
// 不需要身份校验 直接通过