import { request } from "../utils/request";

// 获取用户订单列表
export function userOrderList(args: any) {
  return request({
    url: "/hotelBiz/order/userOrderList",
    method: "post",
    data: args,
  });
}

// 获取订单详情
export function userOrderDetail(args: any) {
  return request({
    url: "/hotelBiz/order/userOrderDetail",
    method: "post",
    data: args,
  });
}

// 预下单
export function preOrder(args: any) {
  return request({
    url: "/hotelBiz/trade/preOrder",
    method: "post",
    data: args,
  });
}

// 订单取消
export function orderCancel(args: any) {
  return request({
    url: "/hotelBiz/trade/cancelRefund",
    method: "post",
    data: args,
  });
}

// 申请退款
export function orderRefund(args: any) {
  return request({
    url: "/hotelBiz/trade/applyRefund",
    method: "post",
    data: args,
  });
}

// 未支付订单立即支付
export function orderPayNow(args: any) {
  return request({
    url: "/hotelBiz/trade/applyPay",
    method: "post",
    data: args,
  });
}
