/** When your routing table is too long, you can split it into small modules **/

import Layout from '@/layout'

const wechatRouter = {
  path: '/wechat',
  component: Layout,
  redirect: '/wechat/caimei',
  alwaysShow: true, // will always show the root menu
  name: 'WeChat', // name必须和后台配置一致，不然匹配不到
  meta: { title: '微信后台', icon: 'wechat' },
  children: [
    {
      path: 'caimei',
      component: () => import('@/views/index'),
      redirect: '/wechat/caimei/menus',
      name: 'WeChatCaimei',
      meta: { title: '采美网公众号', icon: 'component' },
      children: [
        {
          path: 'menus',
          component: () => import('@/views/index'),
          redirect: '/wechat/caimei/menus/list',
          name: 'WeChatCmMenus',
          meta: { title: '菜单管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/caimei/menus/list.vue'),
              name: 'WeChatCmMenuList',
              meta: { title: '菜单列表', activeMenu: '/wechat/caimei/menus' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/caimei/menus/form.vue'),
              name: 'WeChatCmMenuEdit',
              meta: { title: '编辑菜单', noCache: true, activeMenu: '/wechat/caimei/menus' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/caimei/menus/form.vue'),
              name: 'WeChatCmMenuEdit',
              meta: { title: '添加菜单', noCache: true, activeMenu: '/wechat/caimei/menus' }
            }
          ]
        },
        {
          path: 'reply',
          component: () => import('@/views/index'),
          redirect: '/wechat/caimei/reply/list',
          name: 'WeChatCmReply',
          meta: { title: '回复配置' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/caimei/reply/list.vue'),
              name: 'WeChatCmReplyList',
              meta: { title: '回复配置列表', activeMenu: '/wechat/caimei/reply' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/caimei/reply/form.vue'),
              name: 'WeChatCmReplyEdit',
              meta: { title: '编辑回复配置', noCache: true, activeMenu: '/wechat/caimei/reply' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/caimei/reply/form.vue'),
              name: 'WeChatCmReplyEdit',
              meta: { title: '添加回复配置', noCache: true, activeMenu: '/wechat/caimei/reply' }
            }
          ]
        },
        {
          path: 'text',
          component: () => import('@/views/index'),
          redirect: '/wechat/caimei/text/list',
          name: 'WeChatCmText',
          meta: { title: '文本素材管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/caimei/text/list.vue'),
              name: 'WeChatCmTextList',
              meta: { title: '文本素材列表', activeMenu: '/wechat/caimei/text' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/caimei/text/form.vue'),
              name: 'WeChatCmTextEdit',
              meta: { title: '编辑文本素材', noCache: true, activeMenu: '/wechat/caimei/text' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/caimei/text/form.vue'),
              name: 'WeChatCmTextEdit',
              meta: { title: '添加文本素材', noCache: true, activeMenu: '/wechat/caimei/text' }
            }
          ]
        },
        {
          path: 'article',
          component: () => import('@/views/index'),
          redirect: '/wechat/caimei/article/list',
          name: 'WeChatCmArticle',
          meta: { title: '图文素材管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/caimei/article/list.vue'),
              name: 'WeChatCmArticleList',
              meta: { title: '图文素材列表', activeMenu: '/wechat/caimei/article' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/caimei/article/form.vue'),
              name: 'WeChatCmArticleEdit',
              meta: { title: '编辑图文素材', noCache: true, activeMenu: '/wechat/caimei/article' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/caimei/article/form.vue'),
              name: 'WeChatCmArticleEdit',
              meta: { title: '添加图文素材', noCache: true, activeMenu: '/wechat/caimei/article' }
            }
          ]
        }
      ]
    },
    {
      path: 'hehe',
      component: () => import('@/views/index'),
      redirect: '/wechat/hehe/menus',
      name: 'WeChatHehe',
      meta: { title: '呵呵商城公众号', icon: 'component' },
      children: [
        {
          path: 'menus',
          component: () => import('@/views/index'),
          redirect: '/wechat/hehe/menus/list',
          name: 'WeChatHeMenus',
          meta: { title: '菜单管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/hehe/menus/list.vue'),
              name: 'WeChatHeMenuList',
              meta: { title: '菜单列表', activeMenu: '/wechat/hehe/menus' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/hehe/menus/form.vue'),
              name: 'WeChatHeMenuEdit',
              meta: { title: '编辑菜单', activeMenu: '/wechat/hehe/menus' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/hehe/menus/form.vue'),
              name: 'WeChatHeMenuEdit',
              meta: { title: '添加菜单', activeMenu: '/wechat/hehe/menus' }
            }
          ]
        },
        {
          path: 'reply',
          component: () => import('@/views/index'),
          redirect: '/wechat/hehe/reply/list',
          name: 'WeChatHeReply',
          meta: { title: '回复配置' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/hehe/reply/list.vue'),
              name: 'WeChatHeReplyList',
              meta: { title: '回复配置列表', activeMenu: '/wechat/hehe/reply' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/hehe/reply/form.vue'),
              name: 'WeChatHeReplyEdit',
              meta: { title: '编辑回复配置', activeMenu: '/wechat/hehe/reply' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/hehe/reply/form.vue'),
              name: 'WeChatHeReplyEdit',
              meta: { title: '添加回复配置', activeMenu: '/wechat/hehe/reply' }
            }
          ]
        },
        {
          path: 'text',
          component: () => import('@/views/index'),
          redirect: '/wechat/hehe/text/list',
          name: 'WeChatHeText',
          meta: { title: '文本素材管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/hehe/text/list.vue'),
              name: 'WeChatHeTextList',
              meta: { title: '文本素材列表', activeMenu: '/wechat/hehe/text' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/hehe/text/form.vue'),
              name: 'WeChatHeTextEdit',
              meta: { title: '编辑文本素材', activeMenu: '/wechat/hehe/text' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/hehe/text/form.vue'),
              name: 'WeChatHeTextEdit',
              meta: { title: '添加文本素材', activeMenu: '/wechat/hehe/text' }
            }
          ]
        },
        {
          path: 'article',
          component: () => import('@/views/index'),
          redirect: '/wechat/hehe/article/list',
          name: 'WeChatHeArticle',
          meta: { title: '图文素材管理' },
          children: [
            {
              path: 'list',
              hidden: true,
              component: () => import('@/views/wechat/hehe/article/list.vue'),
              name: 'WeChatHeArticleList',
              meta: { title: '图文素材列表', activeMenu: '/wechat/hehe/article' }
            },
            {
              path: 'edit',
              hidden: true,
              component: () => import('@/views/wechat/hehe/article/form.vue'),
              name: 'WeChatHeArticleEdit',
              meta: { title: '编辑图文素材', activeMenu: '/wechat/hehe/article' }
            },
            {
              path: 'add',
              hidden: true,
              component: () => import('@/views/wechat/hehe/article/form.vue'),
              name: 'WeChatHeArticleEdit',
              meta: { title: '添加图文素材', activeMenu: '/wechat/hehe/article' }
            }
          ]
        }
      ]
    }
  ]
}
export default wechatRouter
