各种功能

This commit is contained in:
2026-04-29 18:22:07 +08:00
parent 27586047dc
commit 53abc3a165
6 changed files with 1759 additions and 47 deletions

View File

@@ -52,7 +52,10 @@ export const put = (url, data, options = {}) =>
body: JSON.stringify(data),
});
export const del = (url, options = {}) =>
fetchApi(url, { ...options, method: "DELETE" });
export const del = (url, data, options = {}) => {
const config = { ...options, method: "DELETE" };
if (data) config.body = JSON.stringify(data);
return fetchApi(url, config);
};
export { mock };