diff --git a/src/config/router.config.js b/src/config/router.config.js index 35dfe5a..44b7446 100644 --- a/src/config/router.config.js +++ b/src/config/router.config.js @@ -80,5 +80,10 @@ export const constantRouterMap = [ { path: '/404', component: () => import(/* webpackChunkName: "fail" */ '@/views/system/exception/404') + }, + { + path: '/getway', + name: 'getway', + component: () => import('@/views/getway/index') } ] diff --git a/src/permission.js b/src/permission.js index 9fabf97..f0f74a9 100644 --- a/src/permission.js +++ b/src/permission.js @@ -10,7 +10,7 @@ import { ACCESS_TOKEN, ALL_APPS_MENU } from '@/store/mutation-types' import { Modal, notification } from 'ant-design-vue' // NProgress Configuration import { timeFix } from '@/utils/util' /// es/notification NProgress.configure({ showSpinner: false }) -const whiteList = ['login', 'register', 'registerResult'] // no redirect whitelist +const whiteList = ['login', 'register', 'registerResult', 'getway'] // no redirect whitelist // 无默认首页的情况 const defaultRoutePath = '/welcome' @@ -20,7 +20,7 @@ router.beforeEach((to, from, next) => { if (Vue.ls.get(ACCESS_TOKEN)) { /* has token */ if (to.path === '/user/login') { - //next({ path: defaultRoutePath }) + // next({ path: defaultRoutePath }) NProgress.done() } else { // console.log('=== 非跳转登录页面 ===', store.getters.roles.length) @@ -112,6 +112,7 @@ router.beforeEach((to, from, next) => { } } } else { + console.log(to.name) if (whiteList.includes(to.name)) { // 在免登录白名单,直接进入 next() diff --git a/src/router/generator-routers.js b/src/router/generator-routers.js index ffe0f6c..6560ec7 100644 --- a/src/router/generator-routers.js +++ b/src/router/generator-routers.js @@ -35,8 +35,7 @@ const constantRouterComponents = { TaskLaraRegist: () => import('@/views/main/Taskmanage/TaskLaraRegist'), TaskVgmContrast: () => import('@/views/main/Taskmanage/TaskVgmContrast'), TaskOriginalLost: () => import('@/views/main/Taskmanage/TaskOriginalLost'), - TaskChangeShip: () => import('@/views/main/Taskmanage/TaskChangeShip'), - Getway: () => import('@/views/getway/index') + TaskChangeShip: () => import('@/views/main/Taskmanage/TaskChangeShip') } // 前端未找到页面路由(固定不用改)、原来为 /404 @@ -278,13 +277,6 @@ const booking = [ ] // 订舱 const bookingNew = [ - { - name: 'getway', - path: '/getway', - pid: 0, - id: 10034, - component: 'Getway' - }, { name: 'BookingDetailNew', path: '/BookingDetailNew',