From feee785aa6a66d206513b81ab8ef86e5afd76bf3 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Wed, 18 Mar 2026 15:48:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A1=E5=88=92=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/index.js | 124 ++++++++++++++++++++------------------------ 1 file changed, 55 insertions(+), 69 deletions(-) diff --git a/src/router/index.js b/src/router/index.js index d00352a..593c2ba 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -31,68 +31,54 @@ import Layout from '@/layout' * a base page that does not have permission requirements * all roles can be accessed */ -export const constantRoutes = [ - { - path: '/login', - component: () => import('@/views/login/index'), - hidden: true - }, - { - path: '/404', - component: () => import('@/views/404'), - hidden: true - }, - { - path: '/test', - component: () => import('@/views/component/test.vue'), - hidden: true - }, - { - path: '/info', - component: Layout, - children: [{ - path: 'password', - component: () => import('@/views/system/password'), - name: '密码修改', - meta: { - title: '密码修改' - } - }], - hidden: true - }, - { - path: '/', - component: Layout, - redirect: '/dashboard', - children: [{ - path: 'dashboard', - name: '课程发布管理', - component: () => import('@/views/course/index'), - meta: { - title: '课程发布管理', - icon: 'dashboard' - } - }], - hidden: true - }, - { - path: '/schedule-overview', - component: Layout, - redirect: '/schedule-overview/index', - children: [{ - path: 'index', - name: '课程排期总览', - component: () => import('@/views/scheduleOverview/index'), - meta: { - title: '课程排期总览', - icon: 'table' - } - }] - }, - { - path: '/course/txl', - component: Layout, - redirect: '/dashboard', +export const constantRoutes = [ + { + path: '/login', + component: () => import('@/views/login/index'), + hidden: true + }, + { + path: '/404', + component: () => import('@/views/404'), + hidden: true + }, + { + path: '/test', + component: () => import('@/views/component/test.vue'), + hidden: true + }, + { + path: '/info', + component: Layout, + children: [{ + path: 'password', + component: () => import('@/views/system/password'), + name: '密码修改', + meta: { + title: '密码修改' + } + }], + hidden: true + }, + { + path: '/', + component: Layout, + redirect: '/dashboard', + children: [{ + path: 'dashboard', + name: '课程发布管理', + component: () => import('@/views/course/index'), + meta: { + title: '课程发布管理', + icon: 'dashboard' + } + }], + hidden: true + }, + { + path: '/course/txl', + component: Layout, + redirect: '/dashboard', children: [{ path: '/course/txl', name: '通讯录', @@ -153,13 +139,13 @@ export const constantRoutes = [ }], hidden: true } -] -/** - * asyncRoutes - * the routes that need to be dynamically loaded based on user roles - */ -export const asyncRoutes = [ - // 404 page must be placed at the end !!! +] +/** + * asyncRoutes + * the routes that need to be dynamically loaded based on user roles + */ +export const asyncRoutes = [ + // 404 page must be placed at the end !!! { path: '*', redirect: '/404',