Refactor API requests and update component structure

This commit is contained in:
wangqiao
2025-08-19 22:19:08 +08:00
parent aac4dec3fd
commit 1ef219878c
12 changed files with 329 additions and 270 deletions

View File

@ -44,6 +44,7 @@ const useClientRequest = async <T = unknown>(
config?: Omit<FetchOptions, 'method'>
): Promise<T> => {
return useClientRequest<T>(endpoint, { ...config, method: 'GET' })
}
// POST请求
@ -71,4 +72,4 @@ const useClientRequest = async <T = unknown>(
config?: Omit<FetchOptions, 'method' | 'body'>
): Promise<T> => {
return useClientRequest<T>(endpoint, { ...config, method: 'PUT', body })
}
}