34 lines
848 B
JavaScript
34 lines
848 B
JavaScript
import Vue from 'vue'
|
|
import Router from 'vue-router'
|
|
import index from '@/pages/index'
|
|
import topic from '@/pages/topic'
|
|
import book from '@/pages/book'
|
|
import module from '@/pages/module'
|
|
import rooms from '@/pages/rooms'
|
|
import room from '@/pages/room'
|
|
import article from '@/pages/article'
|
|
import p404 from '@/pages/p404'
|
|
|
|
const routes = [
|
|
{path: '/', name: 'index', component: index},
|
|
{path: '/module', name: 'module', component: module},
|
|
{path: '/rooms', name: 'rooms', component: rooms},
|
|
{path: '/room', name: 'room', component: room},
|
|
{path: '/article', name: 'article', component: article},
|
|
{
|
|
path: '/book',
|
|
name: 'book',
|
|
component: book,
|
|
children: [
|
|
{path: 'topic', component: topic}
|
|
]
|
|
},
|
|
{path: '*', component: p404}
|
|
]
|
|
|
|
Vue.use(Router)
|
|
export default new Router({
|
|
routes,
|
|
mode: 'history'
|
|
})
|