text: import playground from './modules/playground'
  import plugins from './modules/plugins'
  import components from './modules/components'
  
  import objects from './set_modules/objects'
  import admin from './set_modules/admin'
  import forms from './set_modules/forms'
  import funcs from './set_modules/funcs'
  import production from './set_modules/production'
  
  import layoutHeaderAside from '@/layout/header-aside'
  
  // 由于懒加载页面太多的话会造成webpack热更新太慢，所以开发环境不使用懒加载，只有生产环境使用懒加载
  const _import = require('@/libs/util.import.' + process.env.NODE_ENV)
  
  /**
   * 在主框架内显示
   */
  export const frameInRoutes = [
    {
      path: '/',
      redirect: { name: 'index' },
      component: layoutHeaderAside,
      children: [
        {
          path: 'index',
          name: 'index',
          meta: {
            title: '首页',
            auth: true,
            roles: ['u5er', 'r00t']
          },
          component: _import('system/index')
        },
        {
          path: 'log',
          name: 'log',
          meta: {
            title: '前端日志',
            auth: true,
            roles: ['r00t']
          },
          component: _import('system/log')
        },
        {
          path: 'car',
          name: 'car',
          meta: {
            title: '购物车',
            auth: true,
            roles: ['u5er', 'r00t']
          },
          component: _import('set/form/car')
        },
        {
          path: 'refresh',
          name: 'refresh',
          hidden: true,
          component: _import('system/function/refresh')
        },
        {
          path: 'redirect/:route*',
          name: 'redirect',
          hidden: true,
          component: _import('system/function/redirect')
        }
      ]
    },
    playground,
    plugins,
    components,
    objects,
    admin,
    forms,
    funcs,
    production
  ]
  
  /**
   * 在主框架之外显示
   */
  export const frameOutRoutes = [
    // 登录
    {
      path: '/login',
      name: 'login',
      component: _import('system/login')
    },
    {
      path: '/register',
      name: 'register',
      component: _import('system/register')
    }
  ]
  
  /**
   * 错误页面
   */
  export const errorPageRoutes = [
    {
      path: '/401',
      name: '401',
      component: _import('system/error/401')
    },
    {
      path: '*',
      name: '404',
      component: _import('system/error/404')
    }
  ]
  
  // 重新组织后导出
  export default [
    ...frameInRoutes,
    ...frameOutRoutes,
    ...errorPageRoutes
  ]
  