import request from '@/assets/js/utils/request'

/**
 * 获取邮寄地址列表
 */
export function getList() {
  return request({
    url: '/bidprocurement/shoppingmall-product/product/shptMailingAddressController/addressList',
    method: 'get'
  })
}

/**
 * 添加邮寄地址
 * @param data
 */
export function addAdress(data) {
  return request({
    url: '/bidprocurement/shoppingmall-product/product/shptMailingAddressController/addMailingAddressinfo',
    method: 'post',
    data
  })
}

/**
 * 删除邮寄地址
 * @param id
 */
export function deleteAdress(id) {
  return request({
    url: '/bidprocurement/shoppingmall-product/product/shptMailingAddressController/deleteMailingAddressinfo',
    method: 'get',
    params: {
      id
    }
  })
}

/**
 * 修改邮寄地址
 * @param id
 */
export function updateAdress(data) {
  return request({
    url: '/bidprocurement/shoppingmall-product/product/shptMailingAddressController/editMailingAddressinfo',
    method: 'post',
    data
  })
}

/**
 * 获取邮寄地址详细信息
 * @param id
 */
export function getMailingAddressinfo(id) {
  return request({
    url: '/bidprocurement/shoppingmall-product/product/shptMailingAddressController/getMailingAddressinfo',
    method: 'get',
    params: {
      id
    }
  })
}

