58 lines
1.3 KiB
JavaScript
Raw Normal View History

2025-04-10 03:13:12 +01:00
/*
* @Description: router
* @Author: zenghua.wang
* @Date: 2023-06-20 11:48:41
* @LastEditors: zenghua.wang
2025-04-10 03:49:08 +01:00
* @LastEditTime: 2025-04-10 10:24:09
2025-04-10 03:13:12 +01:00
*/
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',
2025-04-10 03:49:08 +01:00
meta: { title: '运营服务', icon: 'House' },
2025-04-10 03:13:12 +01:00
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;