123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195 |
- import Vue from 'vue'
- import Router from 'vue-router'
- Vue.use(Router)
- import Layout from '@/layout'
- export const constantRoutes = [
- {
- path: '/login',
- component: () => import('@/views/login/index'),
- hidden: true
- },
- {
- path: '/404',
- component: () => import('@/views/404'),
- hidden: true
- },
- {
- path: '/',
- component: Layout,
- redirect: '/dashboard',
- children: [{
- path: 'dashboard',
- name: 'Dashboard',
- component: () => import('@/views/dashboard/index'),
- meta: { title: '首页', icon: 'dashboard', affix: true }
- }]
- },
- {
- path: '/schoolTimetable',
- component: Layout,
- redirect: '/schoolTimetable',
- children: [{
- path: 'schoolTimetable',
- name: 'SchoolTimetable',
- component: () => import('@/views/schoolTimetable/index'),
- meta: { title: '课程表', icon: 'dashboard' }
- }]
- },
- {
- path: '/dashboardBlockRow',
- component: Layout,
- redirect: '/dashboardBlockRow',
- children: [{
- path: 'dashboardBlockRow',
- name: 'DashboardBlockRow',
- component: () => import('@/views/dashboardBlockRow/index'),
- meta: { title: '首页行管理' }
- }],
- hidden: true
- },
- {
- path: '/dashboardRowItem',
- component: Layout,
- redirect: '/dashboardRowItem',
- children: [{
- path: 'dashboardRowItem',
- name: 'DashboardRowItem',
- component: () => import('@/views/dashboardRowItem/index'),
- meta: { title: '首页项列表' }
- }],
- hidden: true
- },
- {
- path: '/tempateList',
- component: Layout,
- redirect: '/tempateList',
- children: [{
- path: 'tempateList',
- name: 'TempateList',
- component: () => import('@/views/tempateList/index'),
- meta: { title: '模板列表', icon: 'dashboard' }
- }]
- },
- {
- path: '/uploadTab',
- component: Layout,
- redirect: '/uploadTab',
- children: [{
- path: 'uploadTab',
- name: 'UploadTab',
- component: () => import('@/views/uploadTab/index'),
- meta: { title: '导入表格' }
- }],
- hidden: true
- },
- {
- path: '/schoolDetail',
- component: Layout,
- redirect: '/schoolDetail',
- children: [{
- path: 'schoolDetail',
- name: 'SchoolDetail',
- component: () => import('@/views/schoolDetail/index'),
- meta: { title: '课程表详情' }
- }],
- hidden: true
- },
- {
- path: '/categoryList',
- component: Layout,
- redirect: '/categoryList',
- children: [{
- path: 'categoryList',
- name: 'CategoryList',
- component: () => import('@/views/categoryList/index'),
- meta: { title: '专区列表', icon: 'dashboard' }
- }]
- },
- {
- path: '/categoryRelation',
- component: Layout,
- redirect: '/categoryRelation',
- children: [{
- path: 'categoryRelation',
- name: 'CategoryRelation',
- component: () => import('@/views/categoryRelation/index'),
- meta: { title: '专区课程列表' }
- }],
- hidden: true
- },
- {
- path: '/memberList',
- component: Layout,
- redirect: '/memberList',
- children: [{
- path: 'memberList',
- name: 'MemberList',
- component: () => import('@/views/memberList/index'),
- meta: { title: '用户列表', icon: 'dashboard' }
- }]
- },
- {
- path: '/memberOrder',
- component: Layout,
- redirect: '/memberOrder',
- children: [{
- path: 'memberOrder',
- name: 'MemberOrder',
- component: () => import('@/views/memberOrder/index'),
- meta: { title: '用户订单' }
- }],
- hidden: true
- },
- {
- path: '/memberAuth',
- component: Layout,
- redirect: '/memberAuth',
- children: [{
- path: 'memberAuth',
- name: 'MemberAuth',
- component: () => import('@/views/memberAuth/index'),
- meta: { title: '用户权限' }
- }],
- hidden: true
- },
-
- { path: '*', redirect: '/404', hidden: true }
- ]
- const createRouter = () => new Router({
-
- scrollBehavior: () => ({ y: 0 }),
- routes: constantRoutes
- })
- const router = createRouter()
- export function resetRouter() {
- const newRouter = createRouter()
- router.matcher = newRouter.matcher
- }
- export default router
|