import request from '/@/utils/request';

export function dicApi() {
    return {
        searchApi: (params?: object) => {
            return request({
                url: '/system/dict/v1/',
                method: 'get',
                params,
            });
        },
        putApi: (params?: object) => {
            return request({
                url: '/system/dict/v1/',
                method: 'PUT',
                params,
            });
        },
        addApi: (params?: object) => {
            return request({
                url: '/system/dict/v1/',
                method: 'POST',
                params,
            });
        },
        deleteApi: (params?: object) => {
            return request({
                url: '/system/dict/v1/',
                method: 'DELETE',
                params,
            });
        },
        /*字典菜单管理*/
        searchItemApi: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/',
                method: 'get',
                params,
            });
        },
        putItemApi: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/',
                method: 'PUT',
                params,
            });
        },
        addItemApi: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/',
                method: 'POST',
                params,
            });
        },
        deleteApiItemApi: (params?: object) => {
            return request({
                url: '/system/dictItem/v1/',
                method: 'DELETE',
                params,
            });
        },
    };

}
