import Index from 'layout/index/index'
export default [
  {
    path: '/login',
    name: 'login',
    meta: {
      title: '登录',
      hideInMenu: true
    },
    // 登录界面
    component: resolve => require(['layout/login/login'], resolve) 
  },
  {
    path: '/',
    name: 'layout',
    redirect: '/enterprise',
    meta: {
      title: '',
      hideInMenu: false
    },
    // 外层视图layout
    component: Index,
    children: [
      {
      path: '/enterprise',
      name: 'enterprise',
      meta: {
        title: '企业信息',
        icon: 'nav_enterprise'
      },
      component: resolve => require(['views/enterprise'], resolve) 
    }, 
    
    {
      path: '/system',
      name: 'system',
      meta: {
        title: '系统管理',
        icon: 'iconnav_sys',
        // 不需要缓存路由组件
        noKeepAlive: true
        // access: ['admin']
      },
      // 用户管理
      component: resolve => require(['views/system'], resolve),
      children: [
        {
          path: 'user',
          name: 'system',
          meta: {
            title: '用户管理',
            noKeepAlive: true
          },
          component: resolve => require(['views/system/user/list'], resolve),
        },
        {
          path: 'user/create',
          name: 'system',
          meta: {
            title: '添加用户',
            hideInMenu: true
          },
          component: resolve => require(['views/system/user/list'], resolve),
        },
        {
          path: 'address',
          name: 'system',
          meta: {
            title: '地址管理',
            noKeepAlive: true
          },
          component: resolve => require(['views/system/address/list'], resolve),
        },
        {
          path: 'store',
          name: 'system',
          meta: {
            title: '门店管理',
            noKeepAlive: true
          },
          component: resolve => require(['views/system/store/list'], resolve),
        },
        
      ]
    }
  ]
  }
]
