👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

50 lines
1.1 KiB

import { request } from '@umijs/max';
import type { BasicListItemDataType } from './data.d';
type ParamsType = {
count?: number;
} & Partial<BasicListItemDataType>;
export async function queryFakeList(
params: ParamsType,
): Promise<{ data: { list: BasicListItemDataType[] } }> {
return request('/api/get_list', {
params,
});
}
export async function removeFakeList(
params: ParamsType,
): Promise<{ data: { list: BasicListItemDataType[] } }> {
return request('/api/post_fake_list', {
method: 'POST',
data: {
...params,
method: 'delete',
},
});
}
export async function addFakeList(
params: ParamsType,
): Promise<{ data: { list: BasicListItemDataType[] } }> {
return request('/api/post_fake_list', {
method: 'POST',
data: {
...params,
method: 'post',
},
});
}
export async function updateFakeList(
params: ParamsType,
): Promise<{ data: { list: BasicListItemDataType[] } }> {
return request('/api/post_fake_list', {
method: 'POST',
data: {
...params,
method: 'update',
},
});
}