mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-18 10:18:14 +08:00
♻️ 部分分区动态获取,重构部分调用
This commit is contained in:
@@ -26,6 +26,20 @@ async function getAllGamesForums(): Promise<Array<TGApp.BBS.Forum.GameForum>> {
|
||||
).data.list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取所有分区
|
||||
* @since Beta v0.6.8
|
||||
* @return {Promise<Array<TGApp.BBS.Game.Item>>}
|
||||
*/
|
||||
async function getGameList(): Promise<Array<TGApp.BBS.Game.Item>> {
|
||||
return (
|
||||
await TGHttp<TGApp.BBS.Game.ListResp>(`${Mahwbu}getGameList`, {
|
||||
method: "GET",
|
||||
headers: { "Content-Type": "application/json", referer: Referer },
|
||||
})
|
||||
).data.list;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取投票信息
|
||||
* @since Beta v0.6.2
|
||||
@@ -80,6 +94,7 @@ const apiHubReq = {
|
||||
vote: { info: getVotes, result: getVoteResult },
|
||||
home: homeNew,
|
||||
forum: getAllGamesForums,
|
||||
game: getGameList,
|
||||
};
|
||||
|
||||
export default apiHubReq;
|
||||
|
||||
Reference in New Issue
Block a user