From e763c82dce8f1d99d085578561c6ebb799428532 Mon Sep 17 00:00:00 2001 From: "34701892@qq.com" <34701892@qq.com> Date: Mon, 5 Jan 2026 20:45:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=BB=9F=E4=B8=80=E6=96=B0=E9=97=BB?= =?UTF-8?q?=E6=9D=A5=E6=BA=90=E6=98=BE=E7=A4=BA=E5=B9=B6=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E6=89=8B=E6=9C=BA=E5=8F=B7=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改多处组件将新闻来源统一显示为"中国证券报" 在获取文章详情API中添加可选phone参数 移除调试用的console.log语句 --- src/api/detail.ts | 7 +++---- src/components/RankListMini.vue | 2 +- src/components/article/indexNewsInfo.vue | 3 ++- src/pages/detail/indexNewsInfo.vue | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/api/detail.ts b/src/api/detail.ts index 71b61cc..1ccde57 100644 --- a/src/api/detail.ts +++ b/src/api/detail.ts @@ -7,10 +7,9 @@ import request from "@/utils/index"; * @returns */ export const fetchArticleDetail = (data: any) => { - return request.get(`/news/detail/${data.id}`); + return request.get(`/news/detail/${data.id}?phone=${data?.phone || null}`); }; - /** * 文章点赞 * @param data @@ -33,11 +32,11 @@ export const fetchArticleFavorate = (data: any) => { // 热门行业 export const getListByTagIndustry = (data: any) => { - console.log("🚀 ~ getListByTagIndustry ~ data:", data) + console.log("🚀 ~ getListByTagIndustry ~ data:", data); return request.get("/news/list/industry", { name: data.name }); }; // 概念标签 export const getListByTag = (data: any) => { return request.get("/news/list/tag", { name: data.name }); -}; \ No newline at end of file +}; diff --git a/src/components/RankListMini.vue b/src/components/RankListMini.vue index ee4eab2..4d27971 100644 --- a/src/components/RankListMini.vue +++ b/src/components/RankListMini.vue @@ -27,7 +27,7 @@ - {{ item.source }} + 中国证券报 {{ dayjs(item.publish_time).format("YYYY-MM-DD HH:MM:ss") }} diff --git a/src/components/article/indexNewsInfo.vue b/src/components/article/indexNewsInfo.vue index 2a53b01..e393f50 100644 --- a/src/components/article/indexNewsInfo.vue +++ b/src/components/article/indexNewsInfo.vue @@ -8,7 +8,8 @@ 来源: - {{ isDomestic ? "中国证券报" : props.data.tag }} + + 中国证券报 diff --git a/src/pages/detail/indexNewsInfo.vue b/src/pages/detail/indexNewsInfo.vue index 4d06b09..175b155 100644 --- a/src/pages/detail/indexNewsInfo.vue +++ b/src/pages/detail/indexNewsInfo.vue @@ -114,7 +114,7 @@ onLoad(async (option: any) => { newType.value = option.type || 14; const res = await fetchArticleDetail({ id: option.id, - // id: 763, + phone: option?.phone || null, }); if (res.code === 200) {