
import request from '@/utils/request'

/***************************************************** hello world ****************************************************/

// 订单列表
export function getPintuanOrderList(params: Record<string, any>) {
    return request.get(`pintuan/order/list`,params)
}

// 订单状态
export function getPintuanOrderStatus() {
    return request.get(`pintuan/order/init`)
}

// 关闭订单
export function pintuanOrderClose(order_no: string) {
    return request.put(`pintuan/order/close/${order_no}`)
}

// 创建订单
export function createPintuanOrder(params: AnyObject) {
    return request.post(`pintuan/order/create`,params)
}

// 结算
export function pintuanOrderCalculate(params: AnyObject) {
    return request.post(`pintuan/order/calculate`,params)
}

// 订单详情
export function getPintuanOrderInfo(order_no: string) {
    return request.get(`pintuan/order/detail/${order_no}`)
}

// 获取核销码
export function getGoodsVerifyCode(params: Record<string, any>) {
    return request.get('/verify', params)
}

// 我的拼单
export function getPintuanMyList(params: Record<string, any>) {
    return request.get('pintuan/group/my_list', params)
}

// 订单退款日志
export function getPintuanOrderRefundLog(order_refund_no: string) {
    return request.get(`pintuan/order/refund/log/${order_refund_no}`)
}

// 我的拼单详情
export function getPintuanMyListDetail(order_no: string) {
    return request.get(`pintuan/group/my_list/${order_no}`)
}

// 核销记录
export function getPintuanVerifyRecord(params: Record<string, any>) {
    return request.get('member_verify_records', params)
}

// 订单数量
export function getPintuanOrderTotal() {
    return request.get('pintuan/order/total')
}
