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

import Layout from '@/layout'

const userRouter = {
  path: '/user',
  component: Layout,
  redirect: '/user/list',
  alwaysShow: true, // will always show the root menu
  name: 'UserSitting', // name必须和后台配置一致，不然匹配不到
  meta: { title: '用户管理', icon: 'user' },
  children: [
    {
      path: 'record-list',
      name: 'RecordList',
      component: () => import('@/views/user/record/list'),
      meta: { title: '用户行为记录', icon: 'international', activeMenu: '/user/list' }
    },
    {
      path: 'detail-list',
      hidden: true,
      component: () => import('@/views/user/record/detail-list'),
      name: 'RecordDtails',
      meta: { title: '查看详情', noCache: true, activeMenu: '/user/list' }
    },
    {
      path: 'customer',
      name: 'CustomerMenu',
      redirect: '/user/customer',
      component: () => import('@/views/index'),
      meta: { title: '潜客搜集' },
      children: [
        {
          path: 'list',
          name: 'CustomerList',
          component: () => import('@/views/user/customer/list'),
          meta: { title: '供应商列表' }
        },
        {
          path: 'market-list',
          name: 'MarketList',
          component: () => import('@/views/user/customer/market-list'),
          meta: { title: '营销数据报表' }
        },
        {
          path: 'market-report-list',
          name: 'MarketReportList',
          component: () => import('@/views/user/customer/market-report-list'),
          meta: { title: '数据报表' },
          hidden: true
        },
        {
          path: 'market-edit',
          name: 'MarketEdit',
          component: () => import('@/views/user/customer/market-edit'),
          meta: { title: '数据报表上传/编辑' },
          hidden: true
        },
        {
          path: 'customer-stat-list',
          name: 'CustomerStatsList',
          component: () => import('@/views/user/customer/customer-stat-list'),
          meta: { title: '潜客统计列表' },
          hidden: true
        },
        {
          path: 'customer-remarks',
          name: 'CustomerRemarks',
          component: () => import('@/views/user/customer/customer-remarks'),
          meta: { title: '潜客备注' },
          hidden: true
        },
        {
          path: 'customer-remarks-add',
          name: 'CustomerRemarksAdd',
          component: () => import('@/views/user/customer/customer-remarks-add '),
          meta: { title: '添加备注' },
          hidden: true
        },
        {
          path: 'customer-ambition-list',
          name: 'CustomerAmbitionList',
          component: () => import('@/views/user/customer/customer-ambition-list'),
          meta: { title: '意向客户数据' },
          hidden: true
        },
        {
          path: 'customer-ambition-edit',
          name: 'CustomerAmbitionEdit',
          component: () => import('@/views/user/customer/customer-ambition-edit'),
          meta: { title: '添加/编辑' },
          hidden: true
        },
        {
          path: 'customer-ambition-sum',
          name: 'CustomerAmbitionSum',
          component: () => import('@/views/user/customer/customer-ambition-sum'),
          meta: { title: '数据总结' },
          hidden: true
        },
        {
          path: 'customer-article-list',
          name: 'CustomerArticleList',
          component: () => import('@/views/user/customer/customer-article-list'),
          meta: { title: '相关文章' },
          hidden: true
        },
        {
          path: 'customer-search-list',
          name: 'CustomerSearchList',
          component: () => import('@/views/user/customer/customer-search-list'),
          meta: { title: '相关搜索词' },
          hidden: true
        },
        {
          path: 'customer-page-list',
          name: 'CustomerPageList',
          component: () => import('@/views/user/customer/customer-page-list'),
          meta: { title: '页面访问统计' },
          hidden: true
        },
        {
          path: 'customer-popup-edit',
          name: 'CustomerPopupEdit',
          component: () => import('@/views/user/customer/customer-popup-edit'),
          meta: { title: '弹窗样式编辑' },
          hidden: true
        },
        {
          path: 'advertis-list',
          name: 'AdvertisList',
          component: () => import('@/views/user/customer/advertis-list'),
          meta: { title: '供应商广告图' }
        },
        {
          path: 'advertis-edit',
          name: 'AdvertisEdit',
          component: () => import('@/views/user/customer/advertis-edit'),
          meta: { title: '广告图添加' }
        }
      ]
    },
    {
      path: 'consult',
      name: 'ConsultMenu',
      redirect: '/user/consult',
      component: () => import('@/views/index'),
      meta: { title: '咨询记录' },
      children: [
        {
          path: 'list',
          name: 'ConsultList',
          component: () => import('@/views/user/consult/list'),
          meta: { title: '用户咨询记录汇总' }
        },
        {
          path: 'unreg-list',
          name: 'UnregList',
          component: () => import('@/views/user/consult/unreg-list'),
          meta: { title: '未注册用户咨询记录' }
        },
        {
          path: 'genre-list',
          name: 'GenreList',
          component: () => import('@/views/user/consult/genre-list'),
          meta: { title: '咨询类别设置' }
        },
        {
          path: 'report-list',
          name: 'ReportList',
          component: () => import('@/views/user/consult/report-list'),
          meta: { title: '报备列表' }
        },
        {
          path: 'detail',
          name: 'ConsultDetail',
          component: () => import('@/views/user/consult/detail'),
          meta: { title: '详情' },
          hidden: true
        },
        {
          path: 'unreg-detail',
          name: 'UnregDetail',
          component: () => import('@/views/user/consult/unreg-detail'),
          meta: { title: '信息详情' },
          hidden: true
        }
      ]
    }
  ]
}
export default userRouter
