import request from '@/utils/request'

// 获取地址列表
export function addresslist(params) {
  return request({
    url: '/app-api/member/user-address/member/list',
    method: 'get',
    params
  })
}

// 新增地址信息
export function addressadd(data) {
  return request({
    url: '/app-api/member/user-address/create',
    method: 'post',
    data
  })
}

// 编辑地址信息
export function addressedit(data) {
  return request({
    url: '/app-api/member/user-address/update',
    method: 'post',
    data
  })
}

// 根据id获取地址信息
export function addressinfo(params) {
  return request({
    url: '/app-api/member/user-address/get',
    method: 'get',
    params
  })
}

// 删除地址信息
export function addressdelete(id) {
  return request({
    url: `/app-api/member/user-address/delete?id=${id}`,
    method: 'post'
  })
}
