This commit is contained in:
oneao committed 2025-08-14 17:28:32 +08:00
1 parent d1b1aafc57
commit 0f1604c709
58 files changed
+15476 -25

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
import axiosInstance from "@/interceptors/http";
export function httpGet<T>(url: string, params?: Record<string, any>): Promise<IResData<T>> {
return axiosInstance.get(url, { params });
}
export function httpPostJson<T>(url: string, data?: Record<string, any>): Promise<IResData<T>> {
return axiosInstance.post(url, data, {
headers: {
"Content-Type": "application/json"
}
});
}
export function httpPostForm<T>(url: string, data?: any): Promise<IResData<T>> {
return axiosInstance.post(url, data, {
headers: {
"Content-Type": "application/x-www-form-urlencoded"
}
});
}