| 2 | export type SuccessMessageMode = 'none' | 'success' | 'error' | undefined; |
| 3 | |
| 4 | export interface RequestOptions { |
| 5 | // 将请求参数拼接到url |
| 6 | joinParamsToUrl?: boolean; |
| 7 | // 格式化请求参数时间 |
| 8 | formatDate?: boolean; |
| 9 | // 是否处理请求结果 |
| 10 | isTransformResponse?: boolean; |
| 11 | // 是否返回本地响应头,需要获取响应头时使用此属性 |
| 12 | isReturnNativeResponse?: boolean; |
| 13 | // 默认将prefix 添加到url |
| 14 | joinPrefix?: boolean; |
| 15 | // 接口地址,如果保留为空,则使用默认值 |
| 16 | apiUrl?: string; |
| 17 | // 请求拼接路径 |
| 18 | urlPrefix?: string; |
| 19 | // 错误消息提示类型 |
| 20 | errorMessageMode?: ErrorMessageMode; |
| 21 | // 成功消息提示类型 |
| 22 | successMessageMode?: SuccessMessageMode; |
| 23 | // 是否添加时间戳 |
| 24 | joinTime?: boolean; |
| 25 | ignoreCancelToken?: boolean; |
| 26 | //是否在标头中发送令牌 |
| 27 | withToken?: boolean; |
| 28 | } |
| 29 | |
| 30 | export interface Result<T = any> { |
| 31 | code: number; |
nothing calls this directly
no outgoing calls
no test coverage detected