import request from '@/utils/request'

// 查询全国省市区/县/辖区/街道列表
export function listDistrict(query) {
  return request({
    url: '/third/district/list',
    method: 'get',
    params: query
  })
}

// 查询全国省市区/县/辖区/街道详细
export function getDistrict(code) {
  return request({
    url: '/third/district/' + code,
    method: 'get'
  })
}

// 新增全国省市区/县/辖区/街道
export function addDistrict(data) {
  return request({
    url: '/third/district',
    method: 'post',
    data: data
  })
}

// 修改全国省市区/县/辖区/街道
export function updateDistrict(data) {
  return request({
    url: '/third/district',
    method: 'put',
    data: data
  })
}

// 删除全国省市区/县/辖区/街道
export function delDistrict(code) {
  return request({
    url: '/third/district/' + code,
    method: 'delete'
  })
}
