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

export async function catePage() {
    return request('/admin/api/goods/category/list', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        data: {},
    });
}

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


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

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

export async function getInfo(params) {
    return request('/admin/cate/get', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        params
    });
}

export async function changeStatus(params) {
    return request('/admin/cate/changeStatus', {
        method: 'GET',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8',
        },
        params
    });
}
