/* * @Description: router * @Author: zenghua.wang * @Date: 2023-06-20 11:48:41 * @LastEditors: zenghua.wang * @LastEditTime: 2025-04-10 09:36:34 */ import { createRouter, createWebHistory } from 'vue-router'; import Layout from '@/layouts/index.vue'; // import systemRouter from './modules/system'; export const constantRoutes = [ { path: '/sub-operation-admin/404', name: '404', component: () => import('@/views/error/404.vue'), hidden: true, }, { path: '/sub-operation-admin/403', name: '403', component: () => import('@/views/error/403.vue'), hidden: true, }, { path: '/sub-operation-admin', name: 'layout', component: Layout, redirect: '/sub-operation-admin/home', meta: { title: '运营管理', icon: 'House' }, children: [ { path: '/sub-operation-admin/home', component: () => import('@/views/home/index.vue'), name: 'home', meta: { title: '首页', icon: 'House' }, }, ], }, ]; /** * @Title notFoundRouter(找不到路由) */ export const notFoundRouter = { path: '/sub-operation-admin/:pathMatch(.*)', name: 'notFound', redirect: '/sub-operation-admin/404', }; const router = createRouter({ history: createWebHistory(), routes: constantRoutes, }); export default router;