This commit is contained in:
Gao Shan
2022-10-04 00:12:49 +08:00
committed by Gao Shan
parent cde3b77e4d
commit 6e95de664d
123 changed files with 7845 additions and 18 deletions
+59
View File
@@ -0,0 +1,59 @@
// @ts-ignore
/* eslint-disable */
declare namespace API {
type Result<T> = {
resp_code?: number;
resp_msg?: number;
datas?: T[];
};
type OptionalResult<T> = {
resp_code?: number;
resp_msg?: number;
datas?: T;
};
type CurrentUser = {
userId?: string;
username?: string;
nickname?: string;
headImgUrl?: string;
sex?: number;
type?: string;
};
type Menu = {
id?: number;
name?: string;
path?: string;
url?: string;
css?: string;
subMenus?: Menu[];
};
type LoginResult = {
access_token?: string;
token_type?: string;
refresh_token?: string;
expires_in?: number;
scope?: string;
account_type?: string;
};
type LoginParams = {
username?: string;
password?: string;
validCode?: string;
deviceId?: string;
};
type ErrorResponse = {
/** 业务约定的错误码 */
errorCode: string;
/** 业务上的错误信息 */
errorMessage?: string;
/** 业务上的请求是否成功 */
success?: boolean;
};
}