From 032b7a1dab732343e17c2bc70a557392ee619b4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E5=85=89=E5=AD=9F?= Date: Fri, 13 Feb 2026 10:06:35 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BF=AE=E6=94=B9=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E6=8B=93=E5=B1=95=E9=98=85=E8=AF=BB=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E4=BC=98=E5=8C=96=E6=95=B0=E6=8D=AE=E5=A4=84?= =?UTF-8?q?=E7=90=86=EF=BC=9B=E8=B0=83=E6=95=B4=E6=8E=A8=E8=8D=90=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=86=E9=A1=B5=E5=A4=A7=E5=B0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/detail/indexNewsInfo.vue | 11 ++++++++--- src/pages/recommend/index.vue | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/pages/detail/indexNewsInfo.vue b/src/pages/detail/indexNewsInfo.vue index 21109cb..ddfa52e 100644 --- a/src/pages/detail/indexNewsInfo.vue +++ b/src/pages/detail/indexNewsInfo.vue @@ -202,9 +202,14 @@ const jumpDetail = (item: any) => { // 新闻id const news_id = ref(""); +// 获取更多拓展阅读 const getFurtherReadData = () => { 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]; + } }); }; @@ -240,9 +245,9 @@ onLoad(async (option: any) => { res.data.content = res.data.content.replace(/\n{3,}/g, "\n"); columnName.value = res.data.columnName1; - + furtherReadData.value = res.data.furtherReadings || []; - + newList(res.data.columnId1); wxShare(); } diff --git a/src/pages/recommend/index.vue b/src/pages/recommend/index.vue index 064daf8..9c664b7 100644 --- a/src/pages/recommend/index.vue +++ b/src/pages/recommend/index.vue @@ -208,7 +208,7 @@ const keyword = ref(""); const isBottom = ref(false); const pages = reactive({ page: 1, - size: 20, + size: 10, total: 0, }); const getList = async () => {