import { RouteRecordRaw } from 'vue-router'

const routes: RouteRecordRaw[] = [
  {
    path: '/',
    redirect: '/index',
    component: () => import('@/layouts/MainLayout.vue'),
    children: [
      //首页
      {
        path: '/index',
        component: () => import('@/pages/Index.vue')
      },
      //素材分组
      {
        path: '/groupingManage',
        component: () => import('@/pages/drainage/groupingManage.vue')
      },
      //客户管理--------------------
      //  客户设置
      {
        path: '/customerSetup',
        component: () => import('@/pages/customer/customerSetup.vue')
      },
      //客户
      {
        path: '/customer',
        component: () => import('@/pages/customerManage/customer.vue')
      },
      //线索
      {
        path: '/clue',
        component: () => import('@/pages/customerManage/clue.vue')
      }
    ]
  },
  // 编辑规则
  {
    path: '/editor/editRule',
    component: () => import('@/pages/editor/editRule.vue')
  },
   // 编辑阶段规则
   {
    path: '/editor/manageStageRange',
    component: () => import('@/pages/editor/manageStageRange.vue')
  },
   // 创建阶段
   {
    path: '/editor/createStageRange',
    component: () => import('@/pages/editor/createStageRange.vue')
  },
  

  {
    path: '/auth/login',
    component: () => import('@/pages/auth/login.vue')
  },
  {
    path: '/auth/regist',
    component: () => import('@/pages/auth/regist.vue')
  },
  // Always leave this as last one,
  // but you can also remove it
  {
    path: '/:catchAll(.*)*',
    component: () => import('pages/Error404.vue')
  }
]

export default routes
