import request from '@/utils/request'

// 查询车辆信息列表
export function listCar(query) {
  return request({
    url: '/rule/car/list',
    method: 'get',
    params: query
  })
}

// 查询车辆信息详细
export function getCar(carId) {
  return request({
    url: '/rule/car/' + carId,
    method: 'get'
  })
}

// 查询车辆信息详细
export function query(carId) {
  return request({
    url: '/rule/car/query/' + carId,
    method: 'post'
  })
}

// 新增车辆信息
export function addCar(data) {
  return request({
    url: '/rule/car',
    method: 'post',
    data: data
  })
}

// 修改车辆信息
export function updateCar(data) {
  return request({
    url: '/rule/car',
    method: 'put',
    data: data
  })
}


// 删除车辆信息
export function delCar(carId) {
  return request({
    url: '/rule/car/' + carId,
    method: 'delete'
  })
}

export function read() {
  return request({
    url: '/rule/car/read',
    method: 'post'
  })
}

export function open() {
  return request({
    // url: 'http://129.211.23.219:9100/manage/open/JAV0VJUJYOTOK9KSY/1',
    url: 'rule/car/open',
    method: 'post'
  })
}

export function close() {
  return request({
    // url: 'http://129.211.23.219:9100/mange/close/JAV0VJUJYOTOK9KSY/1',
    url: 'rule/car/close',
    method: 'post'
  })
}
// 9100






