chore: 新增一批接口

This commit is contained in:
wangxuefeng
2025-02-28 17:14:32 +08:00
parent a835e266b5
commit 2fa8ed74e5
27 changed files with 482 additions and 29 deletions

View File

@@ -0,0 +1,23 @@
import instance from './instance';
export const getMaterialsList = async (data?: Record<string, any>) => {
const response = await instance.get('/api/v1/materials', {
params: data
});
return response.data;
};
export const createMaterials = async (data: any) => {
const response = await instance.post('/api/v1/materials', data);
return response.data;
};
export const updateMaterials = async (id: string, data: any) => {
const response = await instance.put(`/api/v1/materials/${id}`, data);
return response.data;
};
export const deleteMaterials = async (id: string) => {
const response = await instance.delete(`/api/v1/materials/${id}`);
return response.data;
};