From 13291799f92c901de415444a86bf46748fdad46b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E5=85=89=E5=AD=9F?= Date: Tue, 24 Feb 2026 16:47:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20getTopNewsDay=20?= =?UTF-8?q?=E5=87=BD=E6=95=B0=E5=8F=82=E6=95=B0=E7=B1=BB=E5=9E=8B=E5=B9=B6?= =?UTF-8?q?=E5=A4=84=E7=90=86=E8=BF=94=E5=9B=9E=E5=80=BC=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E8=AF=B7=E6=B1=82=E5=A4=B4=E4=B8=AD=E7=9A=84=20phone?= =?UTF-8?q?=20=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/newsInfo.ts | 4 ++-- src/pages/realtimeInfo/pc/rank.vue | 4 +++- src/utils/indexDatav.ts | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/api/newsInfo.ts b/src/api/newsInfo.ts index fd15861..2ec3c11 100644 --- a/src/api/newsInfo.ts +++ b/src/api/newsInfo.ts @@ -16,9 +16,9 @@ export const getConceptCount = (data: any) => { }; // 概念标签贴标 -export const getTopNewsDay = (data: any) => { +export const getTopNewsDay = (params: 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); + return request.get("/top_news_h5_d", params); }; // 概念标签贴标 diff --git a/src/pages/realtimeInfo/pc/rank.vue b/src/pages/realtimeInfo/pc/rank.vue index d4f7274..1455155 100644 --- a/src/pages/realtimeInfo/pc/rank.vue +++ b/src/pages/realtimeInfo/pc/rank.vue @@ -142,7 +142,9 @@ async function getNewsList() { } } else { // 概念标签贴标 - newsList.value = await getTopNewsDay({}); + const res = await getTopNewsDay({}); + + newsList.value = res || [] } } diff --git a/src/utils/indexDatav.ts b/src/utils/indexDatav.ts index ec0f2fd..4cbcd9e 100644 --- a/src/utils/indexDatav.ts +++ b/src/utils/indexDatav.ts @@ -23,7 +23,7 @@ service.interceptors.request.use( // 在发送请求之前做些什么 token if (Session.get("token")) { config.headers!["auth-token"] = `${Session.get("token")}`; - config.headers!["phone"] = `${Session.get("userInfos").phone}`; + config.headers!["phone"] = `${Session.get("userPhone")}`; } return config; },