import request from '@/utils/request'

// 查询订单信息列表
export function getList(query) {
  return request({
    url: '/order/info/list',
    method: 'get',
    params: query
  })
}

// 发起退款
export function refundOrder(outTradeNo,params) {
  return request({
    url: `/order/info/refund/${outTradeNo}`,
    method: 'put',
    params
  })
}

// 查询驾校报表信息
export function exportError(query) {
    return request({
      url: '/order/info/school/list',
      method: 'get',
      params: query
    })
  }

// 新增错题
export function addError(data) {
  return request({
    url: '/question/error',
    method: 'post',
    data: data
  })
}

// 修改错题
export function updateError(data) {
  return request({
    url: '/question/error',
    method: 'put',
    data: data
  })
}

// 删除错题
export function delError(id) {
  return request({
    url: '/question/error/' + id,
    method: 'delete'
  })
}

