import request from '@/utils/request'

// 修改订单地址
export function updateOrderAddress(data) {
  return request({
    url: '/orders/update_address',
    method: 'get',
    params: data
  })
}

// 获取用户地址
export function getUserAddress(data) {
  return request({
    url: '/orders/show_address',
    method: 'get',
    params: data
  })
}

// 添加用户地址
export function addUserAddress(data) {
  return request({
    url: '/orders/add_address',
    method: 'get',
    params: data
  })
}

// 代下单
export function confirmOrder(data) {
  return request({
    url: '/orders/submit_order',
    method: 'post',
    data
  })
}

// 取消订单
export function cancelOrder(data) {
  return request({
    url: '/order/shelvedorder',
    method: 'post',
    data
  })
}

// 获取所有皇冠信息
export function getCrown(data) {
  return request({
    url: '/orders/get_crown',
    method: 'get',
    params: data
  })
}

// 所属
export function getBelongByUser(params) {
  return request({
    url: '/orders/GetUserId',
    method: 'get',
    params
  })
}

// 确认绑定所属
export function publishBindBelong(params) {
  return request({
    url: '/orders/UpAddress',
    method: 'get',
    params
  })
}
