import request from '@/utils/request'

// 查询地区列表
export function listAddress(query) {
  return request({
    url: '/product/address/list',
    method: 'get',
    params: query
  })
}

// 查询地区详细
export function getAddress(id) {
  return request({
    url: '/product/address/' + id,
    method: 'get'
  })
}

// 新增地区
export function addAddress(data) {
  return request({
    url: '/product/address',
    method: 'post',
    data: data
  })
}

// 修改地区
export function updateAddress(data) {
  return request({
    url: '/product/address',
    method: 'put',
    data: data
  })
}

// 删除地区
export function delAddress(id) {
  return request({
    url: '/product/address/' + id,
    method: 'delete'
  })
}
