fix: main data

This commit is contained in:
zzc
2026-06-22 18:07:44 +08:00
parent d1d4481ff5
commit d14084c2a1
3 changed files with 19 additions and 20 deletions

View File

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