wujingjing
2024-08-29 19b778d2d04bed31ce2e1f167c6ff2fda9906421
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
/* eslint-disable */
import * as axios from 'axios';
 
enum ResCode {
    /** @description 成功 */
    Success = 0,
    /** @description 确认(权限验证使用) */
    Confirm = -1,
    /** @description 提示(验证失败后使用) */
    Prompt = -2,
    /** @description 警告(业务异常使用) */
    Alert = -3,
    /** @description 错误(未捕获系统异常使用) */
    Error = -4,
    /** @description 超时(暂不使用) */
    TimeOut = -5,
}
 
// 扩展 axios 数据返回类型,可自行扩展
declare module 'axios' {
    export interface AxiosResponse<T = any> extends {} {
        Code: ResCode;
        Error?: string;
        Data?: T;
        Message: string;
        Extra?: string;
        Timestamp: string;
        [key: string]: T;
    }
}