refactor: 优化请求封装
- 优化Result接口定义 - 新增响应数据解析逻辑 - 优化错误解析逻辑
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
export interface Result<T = unknown> {
|
||||
isSuccess: boolean;
|
||||
code: number;
|
||||
data: T;
|
||||
errorMsg: string;
|
||||
extra: unknown;
|
||||
isSuccess: boolean;
|
||||
msg: string;
|
||||
path?: string;
|
||||
errorMsg: string;
|
||||
timestamp: string;
|
||||
path: string | null;
|
||||
extra: Record<string, any> | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user