feat: 修改获取更多拓展阅读逻辑,优化数据处理;调整推荐列表分页大小

This commit is contained in:
傅光孟 2026-02-13 10:06:35 +08:00
parent d4cbc2c562
commit 032b7a1dab
2 changed files with 9 additions and 4 deletions

View File

@ -202,9 +202,14 @@ const jumpDetail = (item: any) => {
// id // id
const news_id = ref(""); const news_id = ref("");
//
const getFurtherReadData = () => { const getFurtherReadData = () => {
getDetailFurtherReadData(news_id.value).then((res: any) => { getDetailFurtherReadData(news_id.value).then((res: any) => {
furtherReadData.value = [...furtherReadData.value, ...res.data]; if (res.data.length > 0) {
furtherReadData.value = res.data;
} else {
furtherReadData.value = [...furtherReadData.value, ...res.data];
}
}); });
}; };

View File

@ -208,7 +208,7 @@ const keyword = ref("");
const isBottom = ref(false); const isBottom = ref(false);
const pages = reactive({ const pages = reactive({
page: 1, page: 1,
size: 20, size: 10,
total: 0, total: 0,
}); });
const getList = async () => { const getList = async () => {