index.ts
2.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import {createRouter, createWebHistory} from "vue-router";
let routes = [
{
path: '/',
name: 'index',
//使用import可以路由懒加载,如果不使用,太多组件一起加载会造成白屏
component: () => import('../layout/layout.vue'),
children: [
{
//配置404页面
path: '/:catchAll(.*)',
name: '404',
// @ts-ignore
component: () => import('../view/404.vue'),
meta: {title: '404', icon: ''}
},
{
path: '/',
name: 'index',
component: () => import('../view/index.vue'),
meta: {title: '首页', noCache: true, affix: true}
}, {
path: '/personCenter',
name: 'personCenter',
component: () => import('../view/personCenter/personCenter.vue'),
meta: {title: '个人中心', noCache: true, affix: true},
children: [
{
path: 'monitorEnterprise',
name: 'monitorEnterprise',
component: () => import('../view/personCenter/monitorEnterprise.vue'),
meta: {title: '监控企业列表', noCache: true, affix: true},
children: [
{
path: '',
name: 'monitorList',
component: () => import('../view/personCenter/monitorList.vue'),
meta: {title: '当前账号监控企业列表', noCache: true, affix: true}
}, {
path: 'monitorListAll',
name: 'monitorListAll',
component: () => import('../view/personCenter/monitorListAll.vue'),
meta: {title: '全部监控企业列表', noCache: true, affix: true}
},
]
}, {
path: '',
name: 'monitorSetting',
component: () => import('../view/personCenter/monitorSetting.vue'),
meta: {title: '风险动态监控设置', noCache: true, affix: true}
}, {
path: 'monitorManager',
name: 'monitorManager',
component: () => import('../view/personCenter/monitorManager.vue'),
meta: {title: '风险动态监控维度', noCache: true, affix: true}
},
]
}
]
}, {
path: '/login',
name: 'login',
component: () => import('../view/login.vue'),
meta: {title: '信用管家-登录', noCache: true, affix: true}
},
]
// 路由
const router = createRouter({
history: createWebHistory(),
routes
})
// 导出
export default router