mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🐛 修复topic切换分区不生效
This commit is contained in:
@@ -124,8 +124,9 @@ async function firstLoad(): Promise<void> {
|
|||||||
curGame.value = toRaw(info.game_info_list.find((i) => i.id === curGid.value));
|
curGame.value = toRaw(info.game_info_list.find((i) => i.id === curGid.value));
|
||||||
}
|
}
|
||||||
if (curGame.value === undefined) curGame.value = info.game_info_list[0];
|
if (curGame.value === undefined) curGame.value = info.game_info_list[0];
|
||||||
|
curGid.value = curGame.value.id;
|
||||||
showLoading.update(`正在加载${curGame.value.name}帖子列表`);
|
showLoading.update(`正在加载${curGame.value.name}帖子列表`);
|
||||||
const postList = await Mys.Post.getTopicPostList(gid, topic, curSortType.value);
|
const postList = await Mys.Post.getTopicPostList(curGid.value, topic, curSortType.value);
|
||||||
if ("retcode" in postList) {
|
if ("retcode" in postList) {
|
||||||
showLoading.end();
|
showLoading.end();
|
||||||
showSnackbar.error(`[${postList.retcode}] ${postList.message}`);
|
showSnackbar.error(`[${postList.retcode}] ${postList.message}`);
|
||||||
@@ -144,7 +145,12 @@ async function freshPostData(): Promise<void> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
showLoading.start("正在加载帖子列表");
|
showLoading.start("正在加载帖子列表");
|
||||||
const postList = await Mys.Post.getTopicPostList(gid, topic, curSortType.value, lastPostId.value);
|
const postList = await Mys.Post.getTopicPostList(
|
||||||
|
curGid.value,
|
||||||
|
topic,
|
||||||
|
curSortType.value,
|
||||||
|
lastPostId.value,
|
||||||
|
);
|
||||||
if ("retcode" in postList) {
|
if ("retcode" in postList) {
|
||||||
showLoading.end();
|
showLoading.end();
|
||||||
showSnackbar.error(`[${postList.retcode}] ${postList.message}`);
|
showSnackbar.error(`[${postList.retcode}] ${postList.message}`);
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ export async function getTopicFullInfo(
|
|||||||
/**
|
/**
|
||||||
* @description 获取特定话题帖子列表
|
* @description 获取特定话题帖子列表
|
||||||
* @since Beta v0.6.3
|
* @since Beta v0.6.3
|
||||||
* @param {string} gid 游戏分区 ID
|
* @param {number} gid 游戏分区 ID
|
||||||
* @param {string} topicId 话题 ID
|
* @param {string} topicId 话题 ID
|
||||||
* @param {string} orderType 排序方式
|
* @param {string} orderType 排序方式
|
||||||
* @param {string} lastId 最后一条帖子 ID
|
* @param {string} lastId 最后一条帖子 ID
|
||||||
@@ -179,7 +179,7 @@ export async function getTopicFullInfo(
|
|||||||
* @return {Promise<TGApp.Plugins.Mys.Topic.PostData|TGApp.BBS.Response.Base>}
|
* @return {Promise<TGApp.Plugins.Mys.Topic.PostData|TGApp.BBS.Response.Base>}
|
||||||
*/
|
*/
|
||||||
export async function getTopicPostList(
|
export async function getTopicPostList(
|
||||||
gid: string,
|
gid: number,
|
||||||
topicId: string,
|
topicId: string,
|
||||||
orderType: number = 0,
|
orderType: number = 0,
|
||||||
lastId?: string,
|
lastId?: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user