import request from '@/utils/request'

// 查询邮寄地址列表
export function listPostAddress(query) {
  return request({
    url: '/hezhi/postAddress/list',
    method: 'get',
    params: query
  })
}

// 查询邮寄地址详细
export function getPostAddress(postAddressId) {
  return request({
    url: '/hezhi/postAddress/' + postAddressId,
    method: 'get'
  })
}

// 新增邮寄地址
export function addPostAddress(data) {
  return request({
    url: '/hezhi/postAddress',
    method: 'post',
    data: data
  })
}

// 修改邮寄地址
export function updatePostAddress(data) {
  return request({
    url: '/hezhi/postAddress',
    method: 'put',
    data: data
  })
}

// 删除邮寄地址
export function delPostAddress(postAddressId) {
  return request({
    url: '/hezhi/postAddress/' + postAddressId,
    method: 'delete'
  })
}
