import request from '@/utils/request';

// 获取地图数据
export function getMapData() {
  return request({
    url: '/sch/place/list',
    method: 'get'
  });
}

// 更新驾校状态
export async function updateSchoolStatus(data) {
  return await request({
    url: '/sch/place/updateSchool',
    method: 'put',
    data: data
  });
}

// 新增
export function addPlace(data) {
  return request({
    url: '/sch/place',
    method: 'post',
    data: data
  });
}


// 修改场地
export function updatePlace(data) {
  return request({
    url: '/sch/place',
    method: 'put',
    data: data
  });
}


// 查询场地
export function getAllPlaces(param) {
  return request({
    url: `/sch/place/all`,
    method: 'get',
    params: param
  })

}
