mirror of https://github.com/halo-dev/halo-admin
Filter some paths
parent
79ed569307
commit
40b8cc0ebf
|
@ -227,11 +227,13 @@ export const constantRouterMap = [
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/install',
|
path: '/install',
|
||||||
|
name: 'Install',
|
||||||
meta: { title: '安装向导' },
|
meta: { title: '安装向导' },
|
||||||
component: () => import('@/views/system/Installation')
|
component: () => import('@/views/system/Installation')
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/404',
|
path: '/404',
|
||||||
|
name: '404',
|
||||||
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -18,7 +18,7 @@ router.beforeEach((to, from, next) => {
|
||||||
document.title = to.meta.title + ' | Halo Dashboard'
|
document.title = to.meta.title + ' | Halo Dashboard'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (to.name !== 'Login' && !store.getters.token) {
|
if (to.name !== 'Login' && to.name !== 'Install' && to.name !== '404' && !store.getters.token) {
|
||||||
Vue.$log.debug('Redirectint to Login page')
|
Vue.$log.debug('Redirectint to Login page')
|
||||||
next({ name: 'Login' })
|
next({ name: 'Login' })
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue