| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- import Vue from 'vue'
- import Router from 'vue-router'
-
- Vue.use(Router)
-
- const routes = [
- {
- path: '/',
- redirect: '/pages/home/index'
- },
- {
- path: '/pages/home/index',
- name: 'Home',
- component: () => import('@/pages/home/index')
- },
- {
- path: '/pages/novel/list',
- name: 'NovelList',
- component: () => import('@/pages/novel/list')
- },
- {
- path: '/pages/novel/reader',
- name: 'NovelReader',
- component: () => import('@/pages/novel/reader'),
- props: route => ({
- novelId: route.query.novelId,
- chapterId: route.query.chapterId
- })
- },
- {
- path: '/pages/author/apply',
- name: 'AuthorApply',
- component: () => import('@/pages/author/apply')
- },
- {
- path: '/pages/search/index',
- name: 'Search',
- component: () => import('@/pages/search/index')
- },
- {
- path: '/pages/book/list',
- name: 'BookList',
- component: () => import('@/pages/book/list')
- }
- ]
-
- export default new VueRouter({
- mode: 'history',
- base: process.env.BASE_URL,
- routes
- })
|