import Layout from '@/components/Layout'
export default [
  {
    path: '/',
    name: 'Layout',
    component: Layout,
    redirect: '/content-manage',
    hidden: true
  },
  {
    path: '/content-manage',
    component: Layout,
    redirect: '/content-manage/ads',
    name: 'ContentManage',
    meta: { title: '内容管理', icon: 'el-icon-document' },
    children: [
      {
        path: 'ads',
        name: 'Ads',
        component: () => import('@/pages/content-manage/ads/index'),
        meta: { title: '广告列表', icon: '', permission: 'content-menu-advert-list' }
      },
      {
        path: 'article',
        name: 'Article',
        component: () => import('@/pages/content-manage/article/index'),
        meta: { title: '文章列表', icon: '', permission: 'content-menu-acticle-list' }
      },
      {
        path: 'image-text',
        name: 'ImageText',
        component: () => import('@/pages/content-manage/image-text/index'),
        meta: { title: '图文列表', icon: '', permission: 'content-menu-imgtext-list' }
      }
    ]
  },
  {
    path: '/settings',
    component: Layout,
    redirect: '/settings/staff',
    name: 'Settings',
    meta: { title: '设置', icon: 'el-icon-setting' },
    children: [
      {
        path: 'staff',
        name: 'Staff',
        component: () => import('@/pages/settings/staff/index'),
        meta: { title: '员工管理', icon: '', permission: 'setting-menu-user-manage' }
      },
      {
        path: 'project',
        name: 'Project',
        component: () => import('@/pages/settings/project/index'),
        meta: { title: '项目管理', icon: '', permission: 'setting-menu-project-manage' }
      },
      {
        path: 'type',
        name: 'Type',
        component: () => import('@/pages/settings/type/index'),
        meta: { title: '类型管理', icon: '', permission: 'setting-menu-type-manage' }
      },
      {
        path: 'role',
        name: 'Role',
        component: () => import('@/pages/settings/role/index'),
        meta: { title: '高级设置', icon: '', permission: 'setting-menu-advanced-setting' }
      }
    ]
  },
  {
    path: '/error-page',
    component: Layout,
    redirect: '/error-page/404',
    name: 'ErrorPage',
    meta: { title: '访问出错', icon: 'el-icon-setting' },
    hidden: true,
    children: [
      {
        path: '404',
        name: '404',
        component: () => import('@/pages/error-page/404'),
        meta: { title: '404', icon: '' }
      },
      {
        path: '401',
        name: '401',
        component: () => import('@/pages/error-page/401'),
        meta: { title: '401', icon: '' }
      }
    ]
  },
  { path: '*', redirect: '/error-page', hidden: true }
]
