import request from '@/utils/request'

export function add(data) {
  return request({
    url: '/bxg/api/yxStoreOrder',
    method: 'post',
    data
  })
}

export function del(id) {
  return request({
    url: '/bxg/api/yxStoreOrder/' + id,
    method: 'delete'
  })
}

export function edit(data) {
  return request({
    url: '/bxg/api/yxStoreOrder',
    method: 'put',
    data
  })
}

export function updateDelivery(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/updateDelivery',
    method: 'put',
    data
  })
}

export function editT(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/check',
    method: 'put',
    data
  })
}

export function refund(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/refund',
    method: 'post',
    data
  })
}

export function editOrder(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/edit',
    method: 'post',
    data
  })
}

export function remark(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/remark',
    method: 'post',
    data
  })
}

export function get() {
  return request({
    url: '/bxg/api/yxExpress',
    method: 'get'
  })
}

export function express(data) {
  return request({
    url: '/bxg/api/yxStoreOrder/express',
    method: 'post',
    data
  })
}

export function getOrderDetail(id) {
  return request({
    url: '/bxg/api/getStoreOrderDetail/' + id,
    method: 'get'
  })
}

export function getNowOrderStatus(id) {
  return request({
    url: '/bxg/api/getNowOrderStatus/' + id,
    method: 'get'
  })
}
