import http from '@/utils/request'

// 通道组接口
export function apiChannelGroup (url, { data: params }) {
  return http.post(`checkerChannelGroup/${url}`, { data: params })
}

// 通道接口
export function apiChannel (url, { data: params }) {
  return http.post(`checkerChannel/${url}`, { data: params })
}
// 获取检票机类型
export function getDeviceTypeList () {
  return http.post('checker/getCheckTypeList')
}

// 获取检票机列表
export function getDeviceList (params) {
  return http.post('/admin/term', { data: params })
}

// 修改检票设备信息·
export function updateDevice (params) {
  return http.post('/admin/term/update', { data: params })
}

// 检票机出入统计
export function getCheckerTrafficRecord (params) {
  return http.post('checker/getCheckerTrafficRecord', { data: params })
}

// 通道出入统计
export function getCheckerChannelTrafficRecord (params) {
  return http.post('checkerChannel/getCheckerChannelTrafficRecord', { data: params })
}

// 删除检票机
export function deleteChecker (id) {
  let params = {
    idList: [id]
  }
  return http.post('/admin/term/delete', { data: params })
}

// 已作废 获取检票区列表
// export function getCheckAreaList () {
//   return http.post('checker/getCheckAreaList')
// }
