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 () => {