| | |
| | | import { createRouter, createWebHashHistory } from 'vue-router' |
| | | import { createRouter, createWebHashHistory, createWebHistory } from 'vue-router' |
| | | import Layout from '@/layout/layout.vue' |
| | | const Transmission = () => import('@/views/transmission.vue') |
| | | const ExportTask = () => import('@/views/exportTask.vue') |
| | | const Setting = () => import('@/views/setting.vue') |
| | | const Reader = () => import('@/views/readerPages/home.vue') |
| | | const Login = () => import('@/views/login.vue') |
| | | |
| | | const router = createRouter({ |
| | |
| | | routes: [ |
| | | { |
| | | path: '/', |
| | | redirect: 'transmission' |
| | | component: Layout, |
| | | redirect:'/home', |
| | | 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: '/newWord', |
| | | name: 'newWord', |
| | | meta: { auth: true, name: '生词' }, |
| | | component: () => import('@/views/components/newWord.vue') |
| | | }, |
| | | { |
| | | path: '/wrongQuestion', |
| | | name: 'wrongQuestion', |
| | | meta: { auth: true, name: '错题' }, |
| | | component: () => import('@/views/components/wrongQuestion.vue') |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '/home', |
| | | name: 'home', |
| | | meta: { auth: true, name: '阅读器' }, |
| | | component: Reader |
| | | }, |
| | | { |
| | | path: '/webHome', |
| | | name: 'webHome', |
| | | meta: { auth: true, name: 'web阅读器' }, |
| | | component: () => import('@/views/readerPages/webHome.vue') |
| | | }, |
| | | { |
| | | path: '/mobileHome', |
| | | name: 'mobileHome', |
| | | meta: { auth: true, name: '移动阅读器' }, |
| | | component: () => import('@/views/readerPages/mobileHome.vue') |
| | | }, |
| | | { |
| | | path: '/login', |
| | | name: 'login', |
| | | component: Login |
| | | }, |
| | | { |
| | | path: '/', |
| | | component: Layout, |
| | | children: [ |
| | | // { |
| | | // path: '/home', |
| | | // name: 'home', |
| | | // meta: { auth: true }, |
| | | // component: Home |
| | | // }, |
| | | { |
| | | path: '/transmission', |
| | | name: 'transmission', |
| | | meta: { auth: true }, |
| | | component: Transmission |
| | | }, |
| | | { |
| | | path: '/exportTask', |
| | | name: 'exportTask', |
| | | meta: { auth: true }, |
| | | component: ExportTask |
| | | }, |
| | | { |
| | | path: '/setting', |
| | | name: 'setting', |
| | | meta: { auth: true }, |
| | | component: Setting |
| | | } |
| | | ] |
| | | } |
| | | ] |
| | | }) |