import Vue from 'vue'
import VueRouter from 'vue-router'

import Login from '../components/Login.vue'
import User from '../components/User.vue'
import Home from '../components/Home.vue'
import Base from '../components/Base.vue'
import Read from '../components/message/Read.vue'
import editMessage from '../components/message/EditMessage.vue'
import Teacher from '../components/message/Teacher.vue'
import Student from '../components/message/Student.vue'
import Report from '../components/report/Report.vue'
import Person from '../components/report/Person.vue'

Vue.use(VueRouter)

const routes = [
    { path: '/', redirect: '/login' },
    {
        path: '/login',
        component: Login
    },
    {
        path: '/user',
        component: User
    },
    {
        path: '/home',
        component: Home,
        redirect: '/base',
        children: [{
            path: '/base',
            component: Base
        }, {
            path: '/read',
            component: Read
        }, {
            path: '/editMessage',
            component: editMessage
        }, {
            path: '/teacher',
            component: Teacher
        }, {
            path: '/student',
            component: Student
        }, {
            path: '/report',
            component: Report
        }]
    },
    {
        path: '/person',
        component: Person
    },

]

const router = new VueRouter({
    routes
})

export default router