优化拦截器
优化错误捕获 优化全局状态管理 配置全局公用类型
This commit is contained in:
39
src/api/common.d.ts
vendored
Normal file
39
src/api/common.d.ts
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
export type ID = number | string;
|
||||
export type IDS = (number | string)[];
|
||||
|
||||
export interface BaseEntity {
|
||||
createBy?: string;
|
||||
createTime?: string;
|
||||
updateBy?: string;
|
||||
updateTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询参数
|
||||
* @param pageNum 当前页
|
||||
* @param pageSize 每页大小
|
||||
* @param orderByColumn 排序字段
|
||||
* @param isAsc 是否升序
|
||||
*/
|
||||
export interface PageQuery {
|
||||
isAsc?: string;
|
||||
orderByColumn?: string;
|
||||
pageNum?: number;
|
||||
pageSize?: number;
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
export interface ApiResponse<T = any> {
|
||||
code?: number;
|
||||
msg?: string;
|
||||
|
||||
data?: T;
|
||||
rows: T[];
|
||||
total?: number;
|
||||
|
||||
token?: string;
|
||||
|
||||
img?: string;
|
||||
uuid?: string;
|
||||
captchaOnOff?: boolean;
|
||||
}
|
||||
Reference in New Issue
Block a user