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'
import Oneinfo from '../components/report/Oneinfo.vue'
import Moreinfo from '../components/report/Moreinfo.vue'
import Homework from '../components/homework/Homework'
import Unread from '../components/homework/Unread'
import Common from '../views/demo/Common'
import Shiti from '../components/shiti/Shiti'

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,
        redirect: '/oneInfo',
        children: [{
            path: '/oneInfo',
            component: Oneinfo
        }, {
            path: '/moreInfo',
            component: Moreinfo
        }]
    },
    {
        path: '/common',
        component: Common

    },
    {
        path: '/shiti',
        component: Shiti
    },
    {
        path: '/homework',
        component: Homework
    },
    {
        path: '/unread',
        component: Unread
    }


]

const router = new VueRouter({
    routes
})

export default router