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

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

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

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

export async function goodsInfo(params) {
    return request('/api/goods/detail', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        params
    });
}




