import request from '@/utils/request'

// 查询用户收货地址列表
export function listUserAddress(query) {
  return request({
    url: '/system/UserAddress/list',
    method: 'get',
    params: query
  })
}

// 查询用户收货地址详细
export function getUserAddress(id) {
  return request({
    url: '/system/UserAddress/' + id,
    method: 'get'
  })
}

// 新增用户收货地址
export function addUserAddress(data) {
  return request({
    url: '/system/UserAddress',
    method: 'post',
    data: data
  })
}
// 获取接单记录列表
export function getUserDataList(type) {
  return request({
    url: '/system/transfer/getUsersDataList/'+type,
    method: 'get'
  })
}
// 查询企业合
// 修改用户收货地址
export function updateUserAddress(data) {
  return request({
    url: '/system/UserAddress',
    method: 'put',
    data: data
  })
}

// 删除用户收货地址
export function delUserAddress(id) {
  return request({
    url: '/system/UserAddress/' + id,
    method: 'delete'
  })
}
