From 69fffec976f7f800f392af9900487015da37462a Mon Sep 17 00:00:00 2001 From: zzp <34701892@qq.com> Date: Sun, 28 Sep 2025 10:02:34 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E8=B5=84=E8=AE=AF=E6=8E=92=E8=A1=8C):=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=8C=89=E6=97=A5=E8=8E=B7=E5=8F=96=E5=A4=B4?= =?UTF-8?q?=E6=9D=A1=E8=B5=84=E8=AE=AF=E5=8A=9F=E8=83=BD=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E5=88=97=E8=A1=A8=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在newsInfo.ts中新增getTopNewsDay接口用于获取每日头条资讯 - 修改rank.vue使用新接口并简化模板代码 - 移除冗余的模板逻辑,保持代码简洁 --- src/api/newsInfo.ts | 6 +++++ src/pages/realtimeInfo/pc/rank.vue | 36 ++++++++---------------------- 2 files changed, 15 insertions(+), 27 deletions(-) diff --git a/src/api/newsInfo.ts b/src/api/newsInfo.ts index e7e9408..43b43f7 100644 --- a/src/api/newsInfo.ts +++ b/src/api/newsInfo.ts @@ -15,6 +15,12 @@ export const getConceptCount = (data: any) => { return request.get("/news_info/concept/count", data); }; +// 概念标签贴标 +export const getTopNewsDay = (data: any) => { + // return request.get("/top_news_h5_period?start_date=" + data.start_date + "&end_date=" + data.end_date + "&limit_num=" + data.limit_num, data); + return request.get("/top_news_h5_d", data); +}; + // 概念标签贴标 export const getTopNews = (data: any) => { return request.get("/top_news_h5_period?start_date=" + data.start_date + "&end_date=" + data.end_date + "&limit_num=" + data.limit_num, data); diff --git a/src/pages/realtimeInfo/pc/rank.vue b/src/pages/realtimeInfo/pc/rank.vue index 4c2f943..e25858c 100644 --- a/src/pages/realtimeInfo/pc/rank.vue +++ b/src/pages/realtimeInfo/pc/rank.vue @@ -2,10 +2,7 @@ - + 资讯头条榜 @@ -16,34 +13,20 @@ - {{ - index + 1 - }} - {{ index + 1 }} - {{ index + 1 }} + {{ index + 1 }} + {{ index + 1 }} + {{ index + 1 }} {{ index + 1 }} - {{ - item.title - }} + {{ item.title }} {{ item.summary }} {{ item.source }} - {{ - dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") - }} + {{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }} {{ item.news_score }} @@ -57,15 +40,14 @@ mode="center" @handlePopupClose="handlePopupClose" @handlePopupSuccessCallback="handlePopupSuccessCallback" - @handlePopupErrorCallback="handlePopupErrorCallback" - /> + @handlePopupErrorCallback="handlePopupErrorCallback" />