mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-24 02:02:31 +08:00
30 lines
626 B
TypeScript
30 lines
626 B
TypeScript
|
import { AxiosRequestConfig } from 'axios';
|
||
|
|
||
|
export interface RequestOptions {
|
||
|
apiUrl?: string;
|
||
|
isJoinPrefix?: boolean;
|
||
|
urlPrefix?: string;
|
||
|
joinParamsToUrl?: boolean;
|
||
|
formatDate?: boolean;
|
||
|
isTransformResponse?: boolean;
|
||
|
isReturnNativeResponse?: boolean;
|
||
|
ignoreRepeatRequest?: boolean;
|
||
|
joinTime?: boolean;
|
||
|
withToken?: boolean;
|
||
|
retry?: {
|
||
|
count: number;
|
||
|
delay: number;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
export interface Result<T = any> {
|
||
|
code: number;
|
||
|
type: 'success' | 'error' | 'warning';
|
||
|
message: string;
|
||
|
result: T;
|
||
|
}
|
||
|
|
||
|
export interface AxiosRequestConfigRetry extends AxiosRequestConfig {
|
||
|
retryCount?: number;
|
||
|
}
|