import request from '@/utils/request'

// 查询售后记录列表
export function listLiveAfterSales(query) {
  return request({
    url: '/live/liveAfterSales/list',
    method: 'get',
    params: query
  })
}

// 查询售后记录详细
export function getLiveAfterSales(id) {
  return request({
    url: '/live/liveAfterSales/' + id,
    method: 'get'
  })
}

// 新增售后记录
export function addLiveAfterSales(data) {
  return request({
    url: '/live/liveAfterSales',
    method: 'post',
    data: data
  })
}

// 修改售后记录
export function updateLiveAfterSales(data) {
  return request({
    url: '/live/liveAfterSales',
    method: 'put',
    data: data
  })
}

// 删除售后记录
export function delLiveAfterSales(id) {
  return request({
    url: '/live/liveAfterSales/' + id,
    method: 'delete'
  })
}

// 导出售后记录
export function exportLiveAfterSales(query) {
  return request({
    url: '/live/liveAfterSales/export',
    method: 'get',
    params: query
  })
}

export function cancel(data) {
  return request({
    url: '/live/liveAfterSales/cancel',
    method: 'post',
    data: data
  })
}

export function refund(data) {
  return request({
    url: '/live/liveAfterSales/refund',
    method: 'post',
    data: data
  })
}

export function audit(data) {
  return request({
    url: '/live/liveAfterSales/audit',
    method: 'post',
    data: data
  })
}
