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