import request from '@/utils/request'

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

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

// 新增用户地址
export function addUserAddress(data) {
  return request({
    url: '/store/userAddress',
    method: 'post',
    data: data
  })
}

// 修改用户地址
export function updateUserAddress(data) {
  return request({
    url: '/store/userAddress',
    method: 'put',
    data: data
  })
}

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

// 导出用户地址
export function exportUserAddress(query) {
  return request({
    url: '/store/userAddress/export',
    method: 'get',
    params: query
  })
}

export function getAddressList(query) {
  return request({
    url: '/store/userAddress/getAddressList',
    method: 'get',
    params: query
  })
}