|
|
@@ -106,6 +106,7 @@ const whiteList = [ |
|
|
|
|
|
|
|
//宅基地 |
|
|
|
'/zjdLogin', |
|
|
|
'/onlineHome/workbench', |
|
|
|
|
|
|
|
//阳光村务--新 |
|
|
|
'/sunVillage_info/login', //登录 |
|
|
@@ -133,6 +134,7 @@ const whiteList = [ |
|
|
|
router.beforeEach((to, from, next) => { |
|
|
|
NProgress.start() |
|
|
|
if (getToken()) { |
|
|
|
console.info(to) |
|
|
|
/* has token*/ |
|
|
|
if (to.path === '/login') { |
|
|
|
next({ path: '/' }) |
|
|
@@ -191,6 +193,7 @@ router.beforeEach((to, from, next) => { |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 没有token |
|
|
|
console.info(to); |
|
|
|
if (whiteList.indexOf(to.path) !== -1) { |
|
|
|
// 在免登录白名单,直接进入 |
|
|
|
console.log(to.path) |
|
|
|