Filter some paths

pull/9/head
johnniang 6 years ago
parent 79ed569307
commit 40b8cc0ebf

@ -227,11 +227,13 @@ export const constantRouterMap = [
},
{
path: '/install',
name: 'Install',
meta: { title: '安装向导' },
component: () => import('@/views/system/Installation')
},
{
path: '/404',
name: '404',
component: () => import(/* webpackChunkName: "fail" */ '@/views/exception/404')
}
]

@ -18,7 +18,7 @@ router.beforeEach((to, from, next) => {
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')
next({ name: 'Login' })
return

Loading…
Cancel
Save