import request from '@/utils/request'

// 查询省市区列表
export function listRegion(query) {
  return request({
    url: '/mall/region/list',
    method: 'get',
    params: query
  })
}

// 查询省市区详细
export function getRegion(id) {
  return request({
    url: '/mall/region/' + id,
    method: 'get'
  })
}

// 新增省市区
export function addRegion(data) {
  return request({
    url: '/mall/region',
    method: 'post',
    data: data
  })
}

// 修改省市区
export function updateRegion(data) {
  return request({
    url: '/mall/region',
    method: 'put',
    data: data
  })
}

// 删除省市区
export function delRegion(id) {
  return request({
    url: '/mall/region/' + id,
    method: 'delete'
  })
}
