import request from '@/utils/request'

// 获取收货地址档案列表
export function getAddressList(data) {
  return request({
    url: `/pu/delivery/address/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
    method: 'post',
    data: data
  })
}
// 收货地址档案新增
export function addAddress(data) {
  return request({
    url: `/pu/delivery/address/add`,
    method: 'post',
    data: data
  })
}
// 收货地址档案修改保存
export function editAddress(data) {
  return request({
    url: `/pu/delivery/address/edit`,
    method: 'put',
    data: data
  })
}
// 收货地址档案详情
export function getAddressDetail(id) {
  return request({
    url: `/pu/delivery/address/detail/${id}`,
    method: 'get',
  })
}
// 收货地址档案删除
export function delAddress(ids) {
  return request({
    url: `/pu/delivery/address/delete/${ids}`,
    method: 'DELETE',
  })
}