import Vue from 'vue'
import Router from 'vue-router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import home from '@/components/pages/home'
import curriculum from '@/components/pages/curriculum'
import notice from '@/components/pages/notice'
import tutor from '@/components/pages/tutor'
import grouping from '@/components/pages/grouping'
import Tgrouping from '@/components/pages/Tgrouping'
import organization from '@/components/pages/organization'
import jurisdiction from '@/components/pages/jurisdiction'
import login from '@/components/login'
import loginBYingShuo from '@/components/loginBYingShuo'
import course from '@/components/pages/courseDetail'
import userManage from '@/components/pages/userManage'
import works from '@/components/pages/works'
import classA from '@/components/pages/class'
import home2 from '@/components/pages/home2'
import new2 from '@/components/pages/new'
import five from '@/components/pages/five'
import fiveDetail from '@/components/pages/fiveDetail'
import data from '@/components/pages/data'
import score from '@/components/pages/score'
import scoreProduct from '@/components/pages/scoreProduct'


Vue.use(Router).use(ElementUI)

export default new Router({
    routes: [{
            path: '/',
            name: 'home',
            component: home,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/data',
            name: 'data',
            component: data,
            meta: {
                requireAuth: true
            }
        },
        {
            path: '/curriculum',
            name: 'curriculum',
            component: curriculum,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/course',
            name: 'course',
            component: course,
            meta: {}
        },
        {
            path: '/notice',
            name: 'notice',
            component: notice,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/find',
            name: 'find',
            component: () =>
                import ('@/components/pages/find'),
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/tutor',
            name: 'tutor',
            component: tutor,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/grouping',
            name: 'grouping',
            component: grouping,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/Tgrouping',
            name: 'Tgrouping',
            component: Tgrouping,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/organization',
            name: 'organization',
            component: organization,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/jurisdiction',
            name: 'jurisdiction',
            component: jurisdiction,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/userManage',
            name: 'userManage',
            component: userManage,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/works',
            name: 'works',
            component: works,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/class',
            name: 'class',
            component: classA,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/new',
            name: 'new',
            component: new2,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/new/newDetail',
            name: 'newDetail',
            component: () =>
                import ('@/components/pages/newDetail'),
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/home',
            name: 'home2',
            component: home2,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/home/homeDetail',
            name: 'homeDetail',
            component: () =>
                import ('@/components/pages/home2Detail'),
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/five',
            name: 'five',
            component: five,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/score',
            name: 'score',
            component: score,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/scoreProduct',
            name: 'scoreProduct',
            component: scoreProduct,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/five/fiveDetail',
            name: 'fiveDetail',
            component: fiveDetail,
            meta: {
                requireAuth: true // 是否需要判断是否登录,这里是需要判断
            }
        },
        {
            path: '/login',
            name: 'login',
            component: login,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        },
        {
            path: '/loginBYingShuo',
            name: 'loginBYingShuo',
            component: loginBYingShuo,
            meta: {
                requireAuth: '' // 不需要鉴权
            }
        }
    ]
})