// 普通路由
export const defaultRoutes = [
  // {
  //   path: '/redirect',
  //   component: 'Layout',
  //   hidden: true,
  //   children: [
  //     {
  //       path: '/redirect/:path*',
  //       component: '/redirect/index'
  //     }
  //   ]
  // },
  {
    path: '/login',
    component: '/login/index',
    hidden: true
  },

  {
    path: '/404',
    component: '/error-page/404',
    hidden: true
  },
  {
    path: '/401',
    component: '/error-page/401',
    hidden: true
  },
  {
    path: '/',
    component: 'Layout',
    redirect: '/dashboard',
    children: [{
      path: 'dashboard',
      name: '',
      component: '/dashboard/index',
      meta: {
        title: '首页',
        icon: 'home',
        affix: true,
      }
    }]
  },

]

// 开发者路由
export const developerRoutes = [

  // {
  //   path: '/developer',
  //   component: 'Layout',
  //   redirect: 'noRedirect',
  //   name: 'developer',
  //   meta: {
  //     title: '开发者管理',
  //     icon: 'backstage'
  //   },
  //   children: [
  //     {
  //       path: 'recovery',
  //       component: '/developer/recovery',
  //       name: 'developerRecovery',
  //       meta: {
  //         title: '数据恢复',
  //         noCache: true
  //       }
  //     }
  //   ]
  // }

]

// 权限路由
export const asyncRoutes = [
  // {
  //   path: '/',
  //   component: 'Layout',
  //   redirect: '/dashboard',
  //   children: [{
  //     path: 'dashboard',
  //     name: 'Dashboard',
  //     component: '/dashboard/index',
  //     meta: {
  //       title: '首页',
  //       icon: 'home',
  //       affix: true
  //     }
  //   }]
  // },
  {
    path: '/company',
    component: 'Layout',
    redirect: 'noRedirect',
    name: 'Company',
    meta: {
      title: '入驻企业',
      icon: 'form'
    },
    children: [{
        path: 'company',
        name: 'CompanyList',
        component: '/company/list',
        meta: {
          title: '入驻企业',
          noCache: true,
          icon: 'tree'
        }
      },
      {
        path: 'edit',
        name: 'EditCompany',
        component: '/company/edit',
        hidden: true,
        meta: {
          title: '添加/修改企业',
          noCache: true
        }
      },
      {
        path: 'talents',
        name: 'CompanyTalents',
        component: '/company/talents',
        meta: {
          title: '人才管理',
          noCache: true,
          icon: 'account'
        }
      },
      {
        path: 'patent',
        name: 'CompanyPatent',
        component: '/company/patent',
        meta: {
          title: '知识产权',
          noCache: true,
          icon: 'inte'
        }
      },
      {
        path: 'project',
        name: 'CompanyProject',
        component: '/company/project',
        meta: {
          title: '企业项目',
          noCache: true,
          icon: 'excel'
        }
      },
      {
        path: 'output',
        name: 'CompanyOutput',
        component: '/company/output',
        meta: {
          title: '企业产值',
          noCache: true,
          icon: 'lock'
        }
      },
      {
        path: 'product',
        name: 'CompanyProduct',
        component: '/company/product',
        meta: {
          title: '企业产品',
          noCache: true,
          icon: 'list'
        }
      }
    ]
  },
  {
    path: '/invest',
    component: 'Layout',
    redirect: 'noRedirect',
    name: 'InvestCompany',
    meta: {
      title: '招商管理',
      icon: 'form'
    },
    children: [{
        path: 'activity',
        name: 'InvestActivity',
        component: '/invest/activity',
        meta: {
          title: '招商活动',
          noCache: true,
          icon: 'stock'
        }
      },
      {
        path: 'achievement',
        name: 'InvestAchievement',
        component: '/invest/achievement',
        meta: {
          title: '招商成果',
          noCache: true,
          icon: 'stock'
        }
      }
    ]
  },
  {
    path: '/friendlyLinks',
    component: 'Layout',
    children: [{
      path: 'friendlyLinks',
      name: 'FriendlyLinks',
      component: '/friendlyLinks/list',
      meta: {
        title: '友情链接',
        icon: 'link'
      }
    }]
  },
  {
    path: '/module',
    component: 'Layout',
    children: [{
      path: 'module',
      name: 'Module',
      component: '/module/module',
      meta: {
        title: '动态模块',
        icon: 'link'
      }
    }]
  },
  {
    path: '/notice',
    component: 'Layout',
    children: [{
      path: 'notice',
      name: 'notice',
      component: '/notice/notice',
      meta: {
        title: '政策公告',
        icon: 'nested'
      }
    }]
  },
  {
    path: '/workstation',
    component: 'Layout',
    children: [{
      path: 'workstation',
      name: 'workstation',
      component: '/workstation/workstation',
      meta: {
        title: '工作站',
        icon: 'email'
      }
    }]
  },
  {
    path: '/backstage',
    component: 'Layout',
    redirect: 'noRedirect',
    name: 'backstageSet',
    meta: {
      title: '后台管理',
      icon: 'form'
    },
    children: [{
        path: 'account',
        component: '/backstage/account',
        name: 'backstage_account',
        meta: {
          title: '账号管理',
          noCache: true,
          icon: 'eye'
        }
      },
      {
        path: 'role',
        component: '/backstage/role',
        name: 'backstage_role',
        meta: {
          title: '角色管理',
          noCache: true,
          icon: 'inte'
        }
      }
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]
