import request from '@/utils/request'

// 查询活动订单列表
export function listActivity(query) {
  return request({
    url: '/mapi/order/activity/list',
    method: 'get',
    params: query
  })
}

// 查询活动订单详细
export function getActivity(id) {
  return request({
    url: '/mapi/order/activity/' + id,
    method: 'get'
  })
}

// 新增活动订单
export function addActivity(data) {
  return request({
    url: '/mapi/order/activity',
    method: 'post',
    data: data
  })
}

// 修改活动订单
export function updateActivity(data) {
  return request({
    url: '/mapi/order/activity',
    method: 'put',
    data: data
  })
}

// 删除活动订单
export function delActivity(id) {
  return request({
    url: '/mapi/order/activity/' + id,
    method: 'delete'
  })
}


// 修改活动订单状态
export function updateActivityStatus(id,status) {
  const data = {
    id,
    status
  }
  return request({
    url: '/mapi/order/activity/updateStatus',
    method: 'post',
    data: data
  })
}

//订单-总部撤单
export function refundOrderActivity(data) {
  return request({
    url: '/mapi/order/activity/refundOrderActivity',
    method: 'post',
    data: data
  })
}

