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

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

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

export async function variationPage(body) {
    return request('/api/userspoints/record/page', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
    });
}
export async function withdrawExtract(body) {
    return request('/api/userspoints/points/extract/export', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
        responseType: 'blob'
    });
}
export async function pointsExtract(body) {
    return request('/api/userspoints/points/export', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
        responseType: 'blob'
    });
}

export async function recordExtract(body) {
    return request('/api/userspoints/points/record/export', {
        method: 'POST',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: body || {},
        responseType: 'blob'
    });
}



