import request from '@/utils/request'
// import qs from 'qs'

// 分页查询车辆列表
export function getCarList(params) {
  return request({
    url: '/car/listPage',
    methods: 'get',
    params
  })
}

// 车辆详情
export function detailCar(id) {
  return request({
    url: '/car/detail/' + id,
    method: 'get',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
    }
  })
}

export function deleteCar(id) {
  return request({
    url: '/car/delete',
    method: 'post',
    params: {
      id: id
    }
  })
}

// 添加车辆
export function addCar(data) {
  return request({
    url: '/car/add',
    method: 'post',
    params: data
  })
}

// 修改车辆
export function editCar(data) {
  return request({
    url: '/car/update',
    method: 'post',
    params: data
  })
}
