Commit bd86d5a6 authored by 张俊's avatar 张俊

管理中心页面首页兼容处理

parent dfbf3eac
...@@ -49,11 +49,13 @@ function inWhiteList(toPath) { ...@@ -49,11 +49,13 @@ function inWhiteList(toPath) {
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
const userInfo = store.state.userInfo const userInfo = store.state.userInfo
console.log(store.state.route);
//已登录不可跳转登陆页 //已登录不可跳转登陆页
if(userInfo&&to.path=='/login'){ if(userInfo&&(to.path=='/login'||to.path=='/')){
next({path:from.path}) next({path:'/develop/account'})
} }
// 检查to.path是否存在于免登陆白名单 // 检查to.path是否存在于免登陆白名单
if (inWhiteList(to.path)) { if (inWhiteList(to.path)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment