import { get } from '@/utils/request'; import { BasicListItemDataType } from './data.d'; interface ParamsType extends Partial { count?: number; } export async function queryFakeList(params: ParamsType) { return get('/api/fake_list', { params, }); } export async function removeFakeList(params: ParamsType) { const { count = 5, ...restParams } = params; return get('/api/fake_list', { method: 'POST', params: { count, }, data: { ...restParams, method: 'delete', }, }); } export async function addFakeList(params: ParamsType) { const { count = 5, ...restParams } = params; return get('/api/fake_list', { method: 'POST', params: { count, }, data: { ...restParams, method: 'post', }, }); } export async function updateFakeList(params: ParamsType) { const { count = 5, ...restParams } = params; return get('/api/fake_list', { method: 'POST', params: { count, }, data: { ...restParams, method: 'update', }, }); }