import request from '@/utils/request'

// 查询区域列表
export function listArea(query) {
  return request({
    url: '/user/area/list',
    method: 'get',
    params: query
  })
}

// 获取所有区域列表
export function getAllAreaList() {
  return request({
    url: '/user/area/getAllAreaList',
    method: 'get'
  })
}

// 查询区域详细
export function getArea(areaId) {
  return request({
    url: '/user/area/' + areaId,
    method: 'get'
  })
}

// 新增区域
export function addArea(data) {
  return request({
    url: '/user/area',
    method: 'post',
    data: data
  })
}

// 修改区域
export function updateArea(data) {
  return request({
    url: '/user/area',
    method: 'put',
    data: data
  })
}

// 删除区域
export function delArea(areaId) {
  return request({
    url: '/user/area/' + areaId,
    method: 'delete'
  })
}
