// 车辆管理接口

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

//租借车位
export const carRent = (data) => {
        return request({
            url: '/carRent',
            method: 'POST',
            data: qs.stringify(data)
        })
    }
// 还车
export const returnCar = (data) => {
        return request({
            url: '/returnCar',
            method: 'POST',
            data: qs.stringify(data)
        })
    }
    // 获取停车场的车辆列表
export const getCars = (id) => {
    return request({
        url: `/getPid?parking_id=${id}`,
        method: 'GET'
    })
}
// 通过停车场ID查询车位列表
export const getCarList = (id) => {
    return request({
        url: `/getCarsInParking?parking_id=${id}`,
    })
}