import request from '@/utils/request'

/**
 * @data 获取订单列表
 */
export function getOrderInfoListAPI(data) {
  return request({
    url: '/smart-canteen/order/list',
    method: 'post',
    data
  })
}

/**
 * @data 获取订单-筛选-订单类型
 */
export function getOrderPayTypeListAPI(data) {
  return request({
    url: '/smart-canteen/api/v2/order/enums/pay-type-list',
    method: 'post',
    data
  })
}

/**
 * @data 获取订单-订单来源
 */
export function getOrderSourceTypeListAPI(data) {
  return request({
    url: '/smart-canteen/api/v2/order/enums/source/type-list',
    method: 'post',
    data
  })
}


/**
 * @data 获取订单-详情
 */
export function getOrderInfoAPI(data) {
  return request({
    url: '/smart-canteen/order/'+data.orderId,
    method: 'post',
    data
  })
}


/**
 * @data 订单评价（发布)
 */
export function addMenuEvaluaOrderApi(data) {
  return request({
    url: '/smart-canteen/cook_evalua_order',
    method: 'post',
    data
  })
}


/**
 * @data 评价中心列表
 */
export function getPageEvaluateListApi(data) {
  return request({
    url: '/smart-canteen/cook_evalua_order/list',
    method: 'get',
	params: data
  })
}
/**
 * @data 订单退单
 */
export function refundOrderApi(data) {
  return request({
    url: '/smart-canteen/order/refund/'+data.orderId,
    method: 'post',
    data
  })
}

/**
 * @data 订单重新支付
 */
export function payOrderApi(data) {
  return request({
    url: '/smart-canteen/order/pay/'+data.orderId,
    method: 'post',
    data
  })
}
