/* Layout */
import Layout from '@/layout'

export default [
  {
    path: '/',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/index'),
    hidden: true
  },
  {
    path: '/login',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/login'),
    hidden: true
  },
  {
    path: '/proxy',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/proxy'),
    hidden: true
  },
  {
    path: '/login/redirect',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/login/redirect'),
    hidden: true
  },
  {
    path: '/redirect',
    component: Layout,
    hidden: true,
    children: [
      {
        path: '/redirect/:path(.*)',
        component: () => import('@/views/common/redirect/index')
      }
    ]
  },
  {
    path: '/pay',
    component: Layout,
    name: 'PayStatus',
    meta: { title: '支付状态' },
    hidden: true,
    redirect: '/pay/success',
    children: [
      {
        path: 'success',
        component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/payment/success'),
        hidden: true
      },
      {
        path: 'faild',
        component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/payment/faild'),
        hidden: true
      }
    ]
  },
  {
    path: '/password',
    component: Layout,
    name: 'Password',
    meta: { title: '密码管理' },
    hidden: true,
    children: [
      {
        path: 'edit',
        meta: { title: '修改密码' },
        component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/password'),
        hidden: true
      }
    ]
  },
  {
    path: '/404',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/error-page/404'),
    hidden: true
  },
  {
    path: '/401',
    component: () => import(/* webpackChunkName: "common-page" */ '@/views/common/error-page/401'),
    hidden: true
  },
  // 404页面 放在最后面
  { path: '*', redirect: '/404', hidden: true }
]
