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, createWebHashHistory, createWebHistory } from 'vue-router'
| import Layout from '@/layout/layout.vue'
| const Reader = () => import('@/views/home.vue')
| const Login = () => import('@/views/login.vue')
|
| const router = createRouter({
| history: createWebHashHistory(import.meta.env.BASE_URL),
| routes: [
| {
| path: '/',
| component: Layout,
| children: [
| {
| path: '/index',
| name: 'index',
| redirect: "/bookshelfList",
| meta: { auth: true },
| component: () => import('@/views/index.vue'),
| children: [
| {
| path: '/bookshelfList',
| name: 'bookshelfList',
| meta: { auth: true, name: '书架' },
| component: () => import('@/views/bookshelfList/list.vue')
| },
| {
| path: '/classeManagement',
| name: 'classeManagement',
| meta: { auth: true, name: '班级' },
| component: () => import('@/views/classeManagement/list.vue')
| },
| {
| path: '/jobManagement',
| name: 'jobManagement',
| meta: { auth: true, name: '作业' },
| component: () => import('@/views/jobManagement/list.vue')
| },
| {
| path: '/personalCenter',
| name: 'personalCenter',
| meta: { auth: true, name: '个人中心' },
| component: () => import('@/views/personalCenter/index.vue')
| },
| {
| path: '/messageList',
| name: 'messageList',
| meta: { auth: true, name: '消息' },
| component: () => import('@/views/messageList/list.vue')
| }
| ]
| },
| {
| path: '/dictionary',
| name: 'dictionary',
| meta: { auth: true, name: '词典' },
| component: () => import('@/views/components/dictionary.vue')
| }
| ]
| },
| {
| path: '/home',
| name: 'home',
| meta: { auth: true, name: '阅读器' },
| component: Reader
| },
| {
| path: '/login',
| name: 'login',
| component: Login
| }
| ]
| })
|
| export default router
|
|