fix: hot trend, thread-detail
Change-Id: Id75946e6778134a4c1703508603b27cea23013d8
diff --git "a/src/app/community/community-detail/\133communityId\135/page.tsx" "b/src/app/community/community-detail/\133communityId\135/page.tsx"
index 850c54e..962cc0f 100644
--- "a/src/app/community/community-detail/\133communityId\135/page.tsx"
+++ "b/src/app/community/community-detail/\133communityId\135/page.tsx"
@@ -111,7 +111,7 @@
const option = selectedOption.name // 添加排序参数
const response = await axios.get<ThreadList>(
process.env.PUBLIC_URL + `/community/threads`, {
- params: { communityId, pageNumber, rows, option, searchValue }
+ params: { userId: 22301145, communityId, pageNumber, rows, option, searchValue }
}
);
console.log('获取帖子列表:', response.data.records);
diff --git "a/src/app/community/thread-detail/\133threadId\135/page.tsx" "b/src/app/community/thread-detail/\133threadId\135/page.tsx"
index 89ae1e8..f998f64 100644
--- "a/src/app/community/thread-detail/\133threadId\135/page.tsx"
+++ "b/src/app/community/thread-detail/\133threadId\135/page.tsx"
@@ -101,7 +101,12 @@
const fetchThreadInfo = async () => {
try {
- const { data } = await axios.get(process.env.PUBLIC_URL + `/thread?threadId=${threadId}`);
+ const { data } = await axios.get(process.env.PUBLIC_URL + `/thread`, {
+ params: {
+ threadId,
+ userId: 22301145
+ }
+ });
setThreadInfo(data);
setTotalComments(data.commentNumber);
} catch (err) {
@@ -110,6 +115,7 @@
}
};
+
// 获取发帖人
useEffect(() => {
if (!threadInfo) return;