export default [
  { path: '/', redirect: '/index' },
  /* 测试页面 */
  {
    path: '/test',
    name: 'courseTest',
    component: () => import('../pages/test.vue')
  },
  /* 如果所有页面都没找到 - 指向 */
  { path: '*', component: () => import('@/components/errorPages/404.vue') },
  /* 首页 */
  {
    path: '/index',
    name: 'index',
    component: () => import('../pages/home/index.vue')
  },
  // 搜索
  {
    path: '/search',
    name: 'search',
    component: () => import('../pages/search/index.vue')
  },
  // 课程学习
  {
    path: '/course/learn',
    name: 'courseLearn',
    component: () => import('../pages/course/learn/index.vue')
  },
  // 课程学习详情
  {
    path: '/course/learn/:id',
    name: 'courseLearnItem',
    component: () => import('../pages/course/learn/item.vue')
  },
  // 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('../pages/login/login.vue')
  }
]
