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