fix: youhua

This commit is contained in:
zzc
2026-06-10 00:45:45 +08:00
parent d325329af4
commit 21bfa3efd8
4 changed files with 28 additions and 36 deletions

View File

@@ -120,8 +120,13 @@ const loadTopicList = async (categoryId, page = 1) => {
try {
loading.value = true;
const res = await fetchTopicList(categoryId, page);
// 提取真实数据数组
const list = res?.list || [];
const rawList =
res?.data?.records ||
res?.data?.list ||
res?.records ||
res?.list ||
(Array.isArray(res?.data) ? res.data : []);
const list = Array.isArray(rawList) ? rawList : [];
// 合并数据
topicList.value = [...topicList.value, ...list];
hasMore.value = list.length >= 5;