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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
| import type { AppRouteModule } from '/@/router/types';
|
| import { PAGE_LAYOUT_COMPONENT } from '/@/router/constant';
| import { ExceptionEnum } from '/@/enums/exceptionEnum';
|
| const ExceptionPage = () => import('/@/views/sys/exception/Exception');
|
| const page: AppRouteModule = {
| path: '/page-demo',
| name: 'PageDemo',
| component: PAGE_LAYOUT_COMPONENT,
| redirect: '/page-demo/exception',
| meta: {
| icon: 'mdi:page-next-outline',
| title: '页面',
| },
| children: [
| // =============================result start=============================
| {
| path: '/result',
| name: 'ResultPage',
| redirect: '/page-demo/result/success',
| meta: {
| title: '结果页',
| },
| children: [
| {
| path: 'success',
| name: 'ResultSuccessPage',
| component: () => import('/@/views/demo/page/result/success/index.vue'),
| meta: {
| title: '成功页',
| },
| },
| {
| path: 'fail',
| name: 'ResultFailPage',
| component: () => import('/@/views/demo/page/result/fail/index.vue'),
| meta: {
| title: '失败页',
| },
| },
| ],
| },
| // =============================result end=============================
|
| // =============================exception start=============================
| {
| path: '/exception',
| name: 'ExceptionPage',
| redirect: '/page-demo/exception/404',
| meta: {
| title: '异常页',
| },
| children: [
| {
| path: '403',
| name: 'PageNotAccess',
| component: ExceptionPage,
| props: {
| status: ExceptionEnum.PAGE_NOT_ACCESS,
| },
| meta: {
| title: '403',
| afterCloseLoading: true,
| },
| },
| {
| path: '404',
| name: 'PageNotFound',
| component: ExceptionPage,
| props: {
| status: ExceptionEnum.PAGE_NOT_FOUND,
| },
| meta: {
| title: '404',
| afterCloseLoading: true,
| },
| },
| {
| path: '500',
| name: 'ServiceError',
| component: ExceptionPage,
| props: {
| status: ExceptionEnum.ERROR,
| },
| meta: {
| title: '500',
| afterCloseLoading: true,
| },
| },
| {
| path: 'net-work-error',
| name: 'NetWorkError',
| component: ExceptionPage,
| props: {
| status: ExceptionEnum.NET_WORK_ERROR,
| },
| meta: {
| title: '网络错误',
| afterCloseLoading: true,
| },
| },
| {
| path: 'not-data',
| name: 'NotData',
| component: ExceptionPage,
| props: {
| status: ExceptionEnum.PAGE_NOT_DATA,
| },
| meta: {
| title: '无数据',
| afterCloseLoading: true,
| },
| },
| ],
| },
| // =============================exception end=============================
|
| // =============================account start=============================
| {
| path: '/account',
| name: 'AccountPage',
| redirect: '/page-demo/account/setting',
| meta: {
| title: '个人页',
| },
| children: [
| {
| path: 'center',
| name: 'AccountCenterPage',
| component: () => import('/@/views/demo/page/account/center/index.vue'),
| meta: {
| title: '个人中心',
| },
| },
| {
| path: 'setting',
| name: 'AccountSettingPage',
| component: () => import('/@/views/demo/page/account/setting/index.vue'),
| meta: {
| title: '个人设置',
| },
| },
| ],
| },
| // =============================account end=============================
| ],
| };
|
| export default page;
|
|