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
| import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router'
| import HomeView from '../views/home/index.vue'
| import PageLayout from '../layout/baseLayout.vue'
| const router = createRouter({
| history: createWebHashHistory(import.meta.env.BASE_URL),
| routes: [
| {
| path: '/',
| name: 'layout',
| component: PageLayout,
| redirect: { name: 'home' },
| children: [
| {
| path: '/home',
| name: 'home',
| component: HomeView,
| },
| //个人中心
| {
| path: '/personalCenter',
| name: 'personalCenter',
| redirect: '/userInfo',
| meta: {
| name: '个人中心',
| },
| component: () => import('@/views/personalCenter/index.vue'),
| children: [
| {
| path: '/userInfo',
| name: 'userInfo',
| meta: {
| name: '账户信息',
| },
| component: () => import('@/views/personalCenter/userInfo.vue'),
| },
| {
| path: '/myCart',
| name: 'myCart',
| meta: {
| name: '购物车',
| },
| component: () => import('@/views/personalCenter/myCart.vue'),
| },
| {
| path: '/myBook',
| name: 'myBook',
| meta: {
| name: '图书',
| },
| component: () => import('@/views/personalCenter/myBook.vue'),
| },
| {
| path: '/myCourse',
| name: 'myCourse',
| meta: {
| name: '课程',
| },
| component: () => import('@/views/personalCenter/course.vue'),
| },
| {
| path: '/myClass',
| name: 'myClass',
| meta: {
| name: '班级',
| },
| component: () => import('@/views/personalCenter/class.vue'),
| },
| {
| path: '/myOrder',
| name: 'myOrder',
| meta: {
| name: '订单',
| },
| component: () => import('@/views/personalCenter/myOrder.vue'),
| },
| {
| path: '/myApply',
| name: 'myApply',
| meta: {
| name: '申请',
| },
| component: () => import('@/views/personalCenter/myApply.vue'),
| },
| {
| path: '/myCollection',
| name: 'myCollection',
| meta: {
| name: '收藏',
| },
| component: () => import('@/views/personalCenter/myCollection.vue'),
| },
| {
| path: '/myMessage',
| name: 'myMessage',
| meta: {
| name: '消息',
| },
| component: () => import('@/views/personalCenter/myMessage.vue'),
| },
| {
| path: '/activateProduct',
| name: 'activateProduct',
| meta: {
| name: '激活码',
| },
| component: () => import('@/views/personalCenter/activeCode.vue'),
| },
| ],
| },
| ],
| },
| ],
| })
|
| export default router
|
|