import http from '../utils/http'
let resquest = "/api/ihotel/hotelOrder"

//  获取请求令牌
export function hotelOrderToken(params) {
    return http.get(`${resquest}/user/submit/token`, params)
}

//  确认订单    
export function hotelOrderConfirm(params) {
    return http.get(`${resquest}/user/order/confirm`, params)
}

//  提交订单
export function hotelOrderSubmit(params) {
    return http.post(`${resquest}/user/order/submit`, params)
}

//  订单列表【用户端】  
export function hotelOrderUserPage(params) {
    return http.get(`${resquest}/user/order/page`, params)
}

//  订单列表【管理端】
export function hotelOrderAdminPage(params) {
    return http.get(`${resquest}/admin/order/page`, params)
}

//  订单详情 【用户端】
export function hotelOrderUserOrderId(params) {
    return http.get(`${resquest}/user/order/{orderId}`, params)
}

//   获取订单支付参数
export function hotelOrderOrderPay(params) {
    return http.get(`${resquest}/user/order/pay/{orderId}`, params)
}



//   获取订单支付参数
export function hotelOrderOrderBill(params) {
    return http.get(`${resquest}/user/order/bill/{orderId}`, params)
}

//  删除订单【用户端】
export function hotelOrderUserDelete(params) {
    return http.delete(`${resquest}/user/order/{orderId}`, params)
}

// 取消订单
export function hotelOrdercancel(params) {
    return http.put(`${resquest}/user/order/cancel/{orderId}`, params)
}

// 办理入住
export function hotelOrderHold(params) {
    return http.put(`${resquest}/user/order/hold/{orderId}`, params)
}

// 办理退房
export function hotelOrderReturn(params) {
    return http.put(`${resquest}/user/order/return/{orderId}`, params)
}

