import request from "@/utils/request.js";

//积分订单列表
export function getPointOrderList(data) {
    return request({
        method: 'get',
        url: '/product/order/list',
        data
    });
}

//积分订单详情
export function getPointOrderInfo(data) {
    return request({
        method: 'get',
        url: '/product/order/detail',
        data
    });
}

//确认收货
export function confirmReceipt(data) {
    return request({
        method: 'put',
        url: '/product/order/confirm/receipt',
        data
    });
}

//取消退货申请
export function cancelReturn(data) {
    return request({
        method: 'put',
        url: `/after/sale/order/cancel/${data.orderId}`
    });
}

//填写物流单号接口
export function orderLogisticsNo(data) {
    return request({
        method: 'put',
        url: `/after/sale/order/wx`,
        data
    });
}



//商品下单
export function productOrderCreate(data) {
    return request({
        method: 'post',
        url: '/product/order/create',
        data
    });
}
//商品支付
export function productOrderPay(data) {
    return request({
        method: 'post',
        url: '/product/order/pay',
        data
    });
}

//取消订单
export function productOrderCancel(data) {
    return request({
        method: 'post',
        url: '/product/order/cancel',
        data
    });
}
//发起售后申请
export function afterSaleOrder(data) {
    return request({
        method: 'post',
        url: '/after/sale/order',
        data
    });
}

