diff --git a/src/config/router.config.js b/src/config/router.config.js index 46babb49..553c6d33 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -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') } ] diff --git a/src/main.js b/src/main.js index dbcd1ae4..edf7486f 100644 --- a/src/main.js +++ b/src/main.js @@ -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