diff --git a/src/router.js b/src/router.js index 0127581..b7cbaa2 100644 --- a/src/router.js +++ b/src/router.js @@ -46,8 +46,10 @@ router.beforeEach((to, from, next) => { // 加入/login判断,防止vue-router报错 if(!token && to.path !== "/login") { next('/login') + return } else { next() + return } } else { next()