♻️ 重构用户登录逻辑及切换

#126
This commit is contained in:
目棃
2024-09-21 19:32:14 +08:00
parent 39a1a1dd77
commit cc7dd7c8ca
27 changed files with 739 additions and 897 deletions

View File

@@ -1,12 +1,12 @@
/**
* @file types/BBS/Account.d.ts
* @description BBS 账户相关类型定义文件
* @since Beta v0.3.4
* @since Beta v0.6.0
*/
/**
* @description 米游社账户信息
* @since Beta v0.3.4
* @since Beta v0.6.0
* @namespace TGApp.BBS.Account
* @memberof TGApp.BBS
*/
@@ -145,4 +145,29 @@ declare namespace TGApp.BBS.Account {
tap_name: string;
reactivate_ticket: string;
}
/**
* @description 游戏账号类型
* @interface GameAccount
* @since Beta v0.6.0
* @property {string} game_biz 游戏 biz例如 hk4e_cn
* @property {string} game_uid 游戏 uid
* @property {boolean} is_chosen 是否为当前选中账号
* @property {boolean} is_official 是否为官服账号
* @property {string} level 游戏等级
* @property {string} nickname 游戏昵称
* @property {string} region 游戏区域
* @property {string} region_name 游戏区域名称
* @return Game
*/
interface GameAccount {
game_biz: string;
game_uid: string;
is_chosen: boolean;
is_official: boolean;
level: string;
nickname: string;
region: string;
region_name: string;
}
}

View File

@@ -1,12 +1,12 @@
/**
* @file types/BBS/Response.d.ts
* @description BBS 返回数据类型定义文件
* @since Beta v0.4.3
* @since Beta v0.6.0
*/
/**
* @description BBS 返回数据类型定义
* @since Beta v0.4.3
* @since Beta v0.6.0
* @namespace TGApp.BBS.Response
* @memberof TGApp.BBS
*/
@@ -209,4 +209,18 @@ declare namespace TGApp.BBS.Response {
msg: string;
};
}
/**
* @description 获取游戏账户数据
* @interface getGameAccounts
* @since Beta v0.6.0
* @extends BaseWithData
* @property {TGApp.BBS.Account.GameAccount[]} data.list - 返回数据
* @returns getGameAccounts
*/
interface getGameAccounts extends BaseWithData {
data: {
list: TGApp.BBS.Account.GameAccount[];
};
}
}