import { axios } from '@/util/axios/request'

const api = {
  carList: '/car/info/card/list',
  carDetail: '/car/info/',
  save: '/car/info/',
  delete: '/car/info/delete/',

}

export function getCarList(parameter) {
  return axios({
    url: api.carList,
    method: 'post',
    data: parameter,
    useFullLoading: true
  })
}

export function getDetail(id) {
  return axios({
    url: api.carDetail + id,
    method: 'get',
    useFullLoading: true
  })
}

export function deleteCar(id) {
  return axios({
    url: api.delete + id,
    method: 'get',
    useFullLoading: true
  })
}

export function save(data) {
  return axios({
    url: api.save,
    method: 'post',
    data: data,
    useFullLoading: true
  })
}




