From 8f0853c41b4c34f287a5f0164941430706ece7ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9B=AE=E6=A3=83?= Date: Sat, 16 Nov 2024 12:07:08 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20=E4=BF=AE=E5=A4=8Dtopic=E5=88=87?= =?UTF-8?q?=E6=8D=A2=E5=88=86=E5=8C=BA=E4=B8=8D=E7=94=9F=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/common/PostTopic.vue | 10 ++++++++-- src/plugins/Mys/request/postReq.ts | 4 ++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/pages/common/PostTopic.vue b/src/pages/common/PostTopic.vue index 632320df..4aeb1e12 100644 --- a/src/pages/common/PostTopic.vue +++ b/src/pages/common/PostTopic.vue @@ -124,8 +124,9 @@ async function firstLoad(): Promise { curGame.value = toRaw(info.game_info_list.find((i) => i.id === curGid.value)); } if (curGame.value === undefined) curGame.value = info.game_info_list[0]; + curGid.value = curGame.value.id; 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) { showLoading.end(); showSnackbar.error(`[${postList.retcode}] ${postList.message}`); @@ -144,7 +145,12 @@ async function freshPostData(): Promise { return; } 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) { showLoading.end(); showSnackbar.error(`[${postList.retcode}] ${postList.message}`); diff --git a/src/plugins/Mys/request/postReq.ts b/src/plugins/Mys/request/postReq.ts index ab370fb0..616ffbbc 100644 --- a/src/plugins/Mys/request/postReq.ts +++ b/src/plugins/Mys/request/postReq.ts @@ -171,7 +171,7 @@ export async function getTopicFullInfo( /** * @description 获取特定话题帖子列表 * @since Beta v0.6.3 - * @param {string} gid 游戏分区 ID + * @param {number} gid 游戏分区 ID * @param {string} topicId 话题 ID * @param {string} orderType 排序方式 * @param {string} lastId 最后一条帖子 ID @@ -179,7 +179,7 @@ export async function getTopicFullInfo( * @return {Promise} */ export async function getTopicPostList( - gid: string, + gid: number, topicId: string, orderType: number = 0, lastId?: string,