// layout
import layoutHeaderAside from '@/layout/header-aside'

const meta = { requiresAuth: true }

/**
 * 在主框架内显示
 */
const frameIn = [
  {
    path: '/',
    redirect: { name: 'index' },
    component: layoutHeaderAside,
    children: [
      {
        path: 'index',
        name: 'index',
        meta,
        component: () => import('@/pages/index')
      },
      {
        path: 'personalInfo',
        name: 'personalInfo',
        meta: { meta, title: '基本信息' },
        component: () => import('@/pages/features/personalInfo')
      },
      {
        path: 'enterMajor',
        name: 'enterMajor',
        meta: { meta, title: '专业信息管理' },
        component: () => import('@/pages/features/enterMajor')
      },
      {
        path: 'enrol',
        name: 'enrol',
        meta: { meta, title: '课程报考' },
        component: () => import('@/pages/features/enrol')
      },
      {
        path: 'enrolGuid',
        name: 'enrolGuid',
        meta: { meta, title: '报考缴费' },
        component: () => import('@/pages/features/enrolGuid')
      },
      {
        path: 'downTicket',
        name: 'downTicket',
        meta: { meta, title: '打印准考证' },
        component: () => import('@/pages/features/downTicket')
      },
      {
        path: 'examLocation',
        name: 'examLocation',
        meta: { meta, title: '统考考场安排' },
        component: () => import('@/pages/features/examLocation')
      },
      {
        path: 'stdBreakDisciplineFile',
        name: 'stdBreakDisciplineFile',
        meta: { meta, title: '违纪告知书和决定书' },
        component: () => import('@/pages/features/stdBreakDisciplineFile')
      },

      {
        path: 'examLocationSpec',
        name: 'examLocationSpec',
        meta: { meta, title: '特殊考场安排' },
        component: () => import('@/pages/features/examLocationSpec')
      },
      {	
        path: 'password',
        name: 'password',
        meta: { meta, title: '修改密码' },
        component: () => import('@/pages/features/password')
      },
      {	
        path: 'bindphone',
        name: 'bindphone',
        meta: { meta, title: '绑定手机' },
        component: () => import('@/pages/features/bindphone')
      },
      {	
        path: 'bindemail',
        name: 'bindemail',
        meta: { meta, title: '绑定邮箱' },
        component: () => import('@/pages/features/bindemail')
      },
      {	
        path: 'xj',
        name: 'xj',
        meta: { meta, title: '学籍电子认证' },
        component: () => import('@/pages/features/xj')
      },
      {	
        path: 'xl',
        name: 'xl',
        meta: { meta, title: '学历认证' },
        component: () => import('@/pages/features/xl')
      },
      {	
        path: 'reportform',
        name: 'reportform',
        meta: { meta, title: '赴考报备表' },
        
      },
      {
        path: 'stdBreakDiscipline',
        name: 'stdBreakDiscipline',
        meta: { meta, title: '违纪查询' },
        component: () => import('@/pages/features/stdBreakDiscipline')
      },
      {
        path: 'examPlan',
        name: 'examPlan',
        meta: { meta, title: '考试计划' },
        component: () => import('@/pages/features/examPlan')
      },
      {
        path: 'payInfoList',
        name: 'payInfoList',
        meta: { meta, title: '缴费查询' },
        component: () => import('@/pages/features/payInfoList')
      },
      {
        path: 'invoicing',
        name: 'invoicing',
        meta: { meta, title: '发票申请' },
        component: () => import('@/pages/features/makepay')
      },
      {
        path: 'refund',
        name: 'refund',
        meta: { meta, title: '退款申请' },
        component: () => import('@/pages/features/refund')
      },
      {
        path: 'byTurnOut',
        name: 'byTurnOut',
        meta: { meta, title: '转出至省外' },
        component: () => import('@/pages/features/byTurnOut')
      },
      {
        path: 'byTurnIn',
        name: 'byTurnIn',
        meta: { meta, title: '省外转至省内' },
        component: () => import('@/pages/features/byTurnIn')
      },
      {
        path: 'courseRepl',
        name: 'courseRepl',
        meta: { meta, title: '课程顶替' },
        component: () => import('@/pages/features/courseRepl')
      },
      {
        path: 'preEduApply',
        name: 'preEduApply',
        meta: { meta, title: '前置学历申请' },
        component: () => import('@/pages/features/preEduApply')
      },
      {
        path: 'neduApply',
        name: 'neduApply',
        meta: { meta, title: '非学历成果认证申请' },
        component: () => import('@/pages/features/neduApply')
      },
      {
        path: 'eduApply',
        name: 'eduApply',
        meta: { meta, title: '学历成果认证申请' },
        component: () => import('@/pages/features/eduApply')
      },
      {
        path: 'byApply',
        name: 'byApply',
        meta: { meta, title: '毕业申请' },
        component: () => import('@/pages/features/byApply')
      },
      {
        path: 'byPaperApply',
        name: 'byPaperApply',
        meta: { meta, title: '毕业论文答辩申请' },
        component: () => import('@/pages/features/byPaperApply')
      },
      {
        path: 'hisScore',
        name: 'hisScore',
        meta: { meta, title: '历史成绩查询' },
        component: () => import('@/pages/features/hisScore')
      },
      {
        path: 'byForecast',
        name: 'byForecast',
        meta: { meta, title: '毕业预测' },
        component: () => import('@/pages/features/byForecast')
      },
      {
        path: 'majorQuery',
        name: 'majorQuery',
        meta: { meta, title: '专业查询' },
        component: () => import('@/pages/features/majorQuery')
      },
      {
        path: 'stdInfoModify',
        name: 'stdInfoModify',
        meta: { meta, title: '考生信息变更申请' },
        component: () => import('@/pages/features/stdInfoModify')
      },
      {
        path: 'uniFiedScore',
        name: 'uniFiedScore',
        meta: { meta, title: '统考成绩查询' },
        component: () => import('@/pages/features/uniFiedScore')
      },
      {
        path: 'collegeScore',
        name: 'collegeScore',
        meta: { meta, title: '校考成绩查询' },
        component: () => import('@/pages/features/collegeScore')
      },
      {
        path: 'turninScore',
        name: 'turninScore',
        meta: { meta, title: '转入成绩查询' },
        component: () => import('@/pages/features/turninScore')
      },
      {
        path: 'certificate',
        name: 'certificate',
        meta: { meta, title: '毕业证明书申请' },
        component: () => import('@/pages/features/byCertificate')
      },
      {
        path: 'score',
        name: 'score',
        meta: { meta, title: '成绩查询' },
        component: () => import('@/pages/features/score')
      },

      
    ]
  },

]

/**
 * 在主框架之外显示
 */
const frameOut = [
  // 页面重定向使用 必须保留
  {
    path: '/redirect/:path*',
    component: () => import('@/pages/redirect')
  },
  // 登录
  {
    path: '/login',
    name: 'login',
    component: () => import('@/pages/login')
  },
  {
    path: '/reg',
    name: 'reg',
    meta: { meta, title: '注册' },
    component: () => import('@/pages/reg')
  },
]

/**
 * 错误页面
 */
const errorPage = [
  // 404
  {
    path: '*',
    name: '404',
    component: () => import('@/pages/error-page-404')
  }
]

// 导出需要显示菜单的
export const frameInRoutes = frameIn

// 重新组织后导出
export default [
  ...frameIn,
  ...frameOut,
  ...errorPage
]
