From ed307fc6a68cd6592589a4bafb7717c0fe7f74cd Mon Sep 17 00:00:00 2001 From: litian <2804272236@qq.com> Date: 星期四, 30 五月 2024 09:21:04 +0800 Subject: [PATCH] Merge branch 'master' of http://182.92.203.7:2001/r/TextbookReader --- src/router/index.ts | 67 +++++++++++++++++++++++++-------- 1 files changed, 51 insertions(+), 16 deletions(-) diff --git a/src/router/index.ts b/src/router/index.ts index 9664723..49f42f3 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,37 +1,72 @@ import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router' import Layout from '@/layout/layout.vue' -const Home = () => import('@/views/home.vue') +const Reader = () => import('@/views/home.vue') const Login = () => import('@/views/login.vue') const router = createRouter({ - history: createWebHistory(import.meta.env.BASE_URL), + history: createWebHashHistory(import.meta.env.BASE_URL), routes: [ - { - path: '/', - redirect: 'home' - }, - { - path: '/login', - name: 'login', - component: Login - }, { path: '/', component: Layout, children: [ { - path: '/home', - name: 'home', + path: '/index', + name: 'index', + redirect: "/bookshelfList", meta: { auth: true }, - component: Home + 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 }, - component: () =>import('@/views/components/dictionary.vue') + 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 } ] }) -- Gitblit v1.9.1