import Vue from 'vue'; import Router from 'vue-router'; Vue.use(Router); export default new Router({ mode: 'hash',     base: process.env.BASE_URL, routes: [ { path: '/', redirect: '/login', }, { path: '/teachingVideo', component: () => import(/* webpackChunkName: "home" */ '../components/page/TeachingVideo.vue'), }, { path: '/', component: () => import(/* webpackChunkName: "home" */ '../components/common/Home.vue'), meta: { title: '自述文件' }, children: [ { path: '/personalcenter', component: () => import(/* webpackChunkName: "student" */'../components/page/PersonalCenter.vue'), meta: { title: '个人中心' } }, { path: '/dashboard', component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/Dashboard.vue'), meta: { title: '管理员' } }, { path: '/ProjectIntro', component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectIntro.vue'), meta: { title: '管理员' } }, { path: '/ProjectPattern', component: () => import(/* webpackChunkName: "dashboard" */ '../components/page/ProjectPattern.vue'), meta: { title: '管理员' } }, { path: '/showExperiment', component: () => import(/* webpackChunkName: "403" */ '../components/page/ShowExperiment.vue') }, { // 国际化组件 path: '/i18n', component: () => import(/* webpackChunkName: "i18n" */ '../components/page/I18n.vue'), meta: { title: '国际化' } }, { // 权限页面 path: '/permission', component: () => import(/* webpackChunkName: "permission" */ '../components/page/Permission.vue'), meta: { title: '权限测试', permission: true } }, { path: '/404', component: () => import(/* webpackChunkName: "404" */ '../components/page/404.vue'), meta: { title: '404' } }, { path: '/403', component: () => import(/* webpackChunkName: "403" */ '../components/page/403.vue'), meta: { title: '403' } } ] }, { path: '/login', component: () => import(/* webpackChunkName: "login" */ '../components/page/Login.vue'), meta: { title: '登录' } }, { path: '/clientLogin', component: () => import(/* webpackChunkName: "login" */ '../components/page/ClientLogin.vue'), meta: { title: '首页' } }, { path: '*', redirect: '/404' } ] });