This commit is contained in:
xingyy 2023-12-07 11:12:06 +08:00
parent db57ea4bc5
commit 0377ab7775

View File

@ -1,3 +1,5 @@
import {config} from "@/tmui/components/tm-message/interface";
type HttpMethod = type HttpMethod =
| "GET" | "GET"
| 'get' | 'get'
@ -28,9 +30,9 @@ interface RequestOptions {
} }
type RequestInterceptor = (config: RequestOptions) => RequestOptions; type RequestInterceptor = (config: RequestOptions) => RequestOptions;
type ResponseInterceptor = (response: any) => any; type ResponseInterceptor = (response: any) => any;
interface Interceptors{ interface Interceptors {
request:(config: RequestOptions)=>{}, request: (config: RequestOptions) => RequestOptions;
response:(response:any)=>{} response: (response: any) => any;
} }
class uniFetch { class uniFetch {
baseUrl: string; baseUrl: string;