mirror of
https://github.com/Tencent/tdesign-vue-next-starter.git
synced 2024-12-23 17:26:49 +08:00
88feed0e8c
* feat: 将请求分类至api文件夹 * chore: 修改接口的导入方式为类型,防止vite打包错误
28 lines
564 B
TypeScript
28 lines
564 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;
|
|
data: T;
|
|
}
|
|
|
|
export interface AxiosRequestConfigRetry extends AxiosRequestConfig {
|
|
retryCount?: number;
|
|
}
|