/* Layout */
import Layout from '@/layout'
// 认证机构路由
const clubRoutes = [
  {
    path: '/club',
    component: Layout,
    alwaysShow: true,
    redirect: '/club/list',
    name: 'Club',
    meta: { title: '机构认证', icon: 'el-icon-s-custom', roles: ['normal'], noCache: true, proxy: true },
    children: [
      // 机构
      {
        path: 'list',
        component: () => import('@/views/normal/club'),
        name: 'ClubList',
        meta: {
          title: '机构列表',
          icon: 'el-icon-menu',
          roles: ['admin', 'normal'],
          affix: true,
          noCache: true,
          proxy: true
        }
      },
      {
        path: 'club-add',
        component: () => import('@/views/normal/club/edit'),
        name: 'ClubAdd',
        hidden: true,
        meta: { title: '添加机构', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true }
      },
      {
        path: 'club-edit',
        component: () => import('@/views/normal/club/edit'),
        name: 'ClubEdit',
        hidden: true,
        meta: { title: '修改机构', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true }
      },
      // 用户
      {
        path: 'user-list',
        component: () => import('@/views/normal/club/user'),
        name: 'ClubUserList',
        hidden: true,
        meta: { title: '登录用户', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true }
      },
      // 设备
      {
        hidden: true,
        path: 'device-list',
        component: () => import('@/views/normal/club/device'),
        name: 'ClubDeviceList',
        meta: { title: '设备列表', icon: 'el-icon-menu', roles: ['normal'], noCache: true, id: 24 }
      },
      {
        hidden: true,
        path: 'device-add',
        component: () => import('@/views/normal/club/device/edit'),
        name: 'ClubDeviceAdd',
        meta: { title: '添加设备', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true, id: 25 }
      },
      {
        hidden: true,
        path: 'device-edit',
        component: () => import('@/views/normal/club/device/edit'),
        name: 'ClubDeviceEdit',
        meta: { title: '修改设备', icon: 'el-icon-menu', roles: ['normal'], noCache: true, proxy: true, id: 26 }
      }
    ]
  }
]

export default clubRoutes
