import request from '@/utils/request'

// 查询订单列表
export function orderPage (query) {
  return request({
    url: '/order/order/page',
    method: 'get',
    params: query
  })
}
// 订单状态枚举
export function orderEnum () {
  return request({
    url: `/order/order/enum`,
    method: 'get',
  })
}
// 获取订单详细信息
export function orderInfo (id) {
  return request({
    url: `/order/order/info/${id}`,
    method: 'get',
  })
}
// 查询订单评价列表
export function orderReviewsPage (query) {
  return request({
    url: `/order/orderReviews/page`,
    method: 'get',
    params: query
  })
}
// 查询售后订单列表
export function orderRefundPage (query) {
  return request({
    url: `/order/orderRefund/page`,
    method: 'get',
    params: query
  })
}
// 同意或拒绝售后订单
export function agreeOrRefuse (data) {
  return request({
    url: `/order/orderRefund/agreeOrRefuse`,
    method: 'post',
    data
  })
}
// 获取售后订单详细信息
export function orderRefundInfo (id) {
  return request({
    url: `/order/orderRefund/info/${id}`,
    method: 'get',
  })
}
// 售后订单 枚举
export function orderRefundEnum () {
  return request({
    url: `/order/orderRefund/enum`,
    method: 'get',
  })
}