import { request } from '@umijs/max';

export async function paymentPage(body) {
    return request('/admin/payment/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function refundPage(body) {
    return request('/admin/payment/refund/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function invoicePage(body) {
    return request('/admin/invoice/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}

export async function exportExcel(body) {
    return request('/admin/invoice/exportExcel', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
        responseType: 'blob'
    });
}

export async function operatingInvoice(body) {
    return request('/admin/invoice/operatingInvoice', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}
