import wellManage from '@/page/wellManage/wellManage'

// 独立功能页面单独写，如下
export const indexRouter = {
  path: '/',
  name: 'index',
  component:() => import('@/page/layout'),
  meta:{
    keepAlive:true
  }
}


export const sliderRouter = {
  path: '/slider',
  name: 'slider',
  component: () => import('page/slider/Slider')
}

export const loginRouter = {
  path: '/login',
  name: 'login',
  component: () => import('page/login/Login')
}

export const wellRouters = [
  {
    path:'/wellManage',
    name: 'wellManage',
    component: () => import('@/page/wellManage/WellManage'),
    meta:{
      keepAlive:true
    }
  },
  {
    path:'/wellDetail/:id',
    name: 'wellDetail',
    component: () => import('@/page/wellManage/WellDetail'),
  },
  {
    path:'/watchData/:id',
    name: 'watchData',
    component: () => import('@/page/wellManage/WatchData')
  },
  {
    path:'/wellBfcf',
    name: 'wellBfcf',
    component: () => import('@/page/wellManage/WellBfcf'),
    meta:{
      keepAlive:true
    }
  },
  {
    path:'/job',
    name: 'job',
    component: () => import('@/page/jobManage/JobManage'),
    meta:{
      keepAlive:true
    }
  },
  {
    path:'/jobOvertime',
    name: 'jobOvertime',
    component: () => import('@/page/overtimeJob/OvertimeJobManage'),
    meta:{
      keepAlive:true
    }
  },
  {
    path:'/jobDetail/:id',
    name: 'jobDetail',
    component: () => import('@/page/jobManage/modules/JobDetail')
  },
  {
    path:'/jobSearch',
    name: 'jobSearch',
    component: () => import('@/page/jobSearch/searchPage'),
  },
  {
    path:'/searchList',
    name: 'searchList',
    component: () => import('@/page/jobSearch/searchList'),
    meta:{
      keepAlive:true
    }
  },
  {
    path:'/mine',
    name: 'mine',
    component: () => import('@/page/mine/index')
  },
  {
    path:'/information',
    name: 'information',
    component: () => import('@/page/mine/modules/Information')
  },
  {
    path:'/resetPwd',
    name: 'resetPwd',
    component: () => import('@/page/mine/modules/ResetPwd')
  },
  {
    path:'/helpMe',
    name: 'helpMe',
    component: () => import('@/page/mine/modules/HelpMe')
  },
  {
    path:'/contactUs',
    name: 'contactUs',
    component: () => import('@/page/mine/modules/ContactUs')
  },
  {
    path:'/aboutUs',
    name: 'aboutUs',
    component: () => import('@/page/mine/modules/AboutUs')
  },
  {
    path: '/*',
    redirect: '/'
  }
]

// ui
export const uiRouters = [
  {
    path: '/ui/toast',
    name: 'toast',
    component: (resolve) => {
      import('@/components/ui/toast/Toast').then((module) => {
        resolve(module)
      })
    }
  },
  {
    path: '/ui/indicator',
    name: 'indicator',
    component: () => import('@/components/ui/indicator/Indicator')
  },
  {
    path: '/ui/loadmore',
    name: 'loadmore',
    component: () => import('@/components/ui/loadmore/Loadmore')
  },
  {
    path: '/ui/infinite-scroll',
    name: 'infiniteScroll',
    component: () => import('@/components/ui/infiniteScroll/InfiniteScroll')
  },
  {
    path: '/ui/message-box',
    name: 'messageBox',
    component: () => import('@/components/ui/messageBox/MessageBox')
  },
  {
    path: '/ui/action-sheet',
    name: 'actionSheet',
    component: () => import('@/components/ui/actionSheet/ActionSheet')
  },
  {
    path: '/ui/popup',
    name: 'popup',
    component: () => import('@/components/ui/popup/Popup')
  }, {
    path: '/ui/swipe',
    name: 'swipe',
    component: () => import('@/components/ui/swipe/Swipe')
  }, {
    path: '/ui/lazyLoad',
    name: 'lazyLoad',
    component: () => import('@/components/ui/lazyLoad/LazyLoad')
  },
  {
    path: '/ui/range',
    name: 'range',
    component: () => import('@/components/ui/range/Range')
  },
  {
    path: '/ui/progress',
    name: 'progress',
    component: () => import('@/components/ui/progress/Progress')
  },
  {
    path: '/ui/picker',
    name: 'picker',
    component: () => import('@/components/ui/picker/Picker')
  },
  {
    path: '/ui/datetime-picker',
    name: 'datetimePicker',
    component: () => import('@/components/ui/datetimePicker/DatetimePicker')
  },
  {
    path: '/ui/index-list',
    name: 'indexList',
    component: () => import('@/components/ui/indexList/IndexList')
  },
  {
    path: '/ui/palette-button',
    name: 'paletteButton',
    component: () => import('@/components/ui/paletteButton/PaletteButton')
  },
  {
    path: '/ui/header',
    name: 'header',
    component: () => import('@/components/ui/header/Header')
  },
  {
    path: '/ui/button',
    name: 'button',
    component: () => import('@/components/ui/button/Button')
  },
  {
    path: '/ui/cell',
    name: 'cell',
    component: () => import('@/components/ui/cell/Cell')
  }, {
    path: '/ui/spinner',
    name: 'spinner',
    component: () => import('@/components/ui/spinner/Spinner')
  }, {
    path: '/ui/search',
    name: 'search',
    component: () => import('@/components/ui/search/Search')
  },
  {
    path: '/ui/switch',
    name: 'switch',
    component: () => import('@/components/ui/switch/Switch')
  }, {
    path: '/ui/checklist',
    name: 'checklist',
    component: () => import('@/components/ui/checklist/Checklist')
  }, {
    path: '/ui/radio',
    name: 'radio',
    component: () => import('@/components/ui/radio/Radio')
  },
  {
    path: '/ui/field',
    name: 'field',
    component: () => import('@/components/ui/field/Field')
  },
  {
    path: '/ui/badge',
    name: 'badge',
    component: () => import('@/components/ui/badge/Badge')
  }
]

export const routers = [
  indexRouter,
  loginRouter,
  sliderRouter,
  // ...uiRouters,
  ...wellRouters
]
