From 894f036ad24b95e5e0bfa142f1cf05d68a3630c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=82=85=E5=85=89=E5=AD=9F?= Date: Wed, 11 Mar 2026 09:28:13 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9A=82=E6=97=B6=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=96=87=E6=A1=88=E6=8F=92=E5=85=A5=E5=8A=9F=E8=83=BD=EF=BC=8C?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E7=9B=B8=E5=85=B3=E4=BB=A3=E7=A0=81=E4=BB=A5?= =?UTF-8?q?=E5=A4=87=E5=90=8E=E7=BB=AD=E4=BD=BF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/article/indexNewsInfo.vue | 40 +++++++++++++----------- 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/src/components/article/indexNewsInfo.vue b/src/components/article/indexNewsInfo.vue index fc9d2af..56c2cf3 100644 --- a/src/components/article/indexNewsInfo.vue +++ b/src/components/article/indexNewsInfo.vue @@ -234,25 +234,29 @@ function getFirstTextNode(node: any): any { const content = computed(() => { const content = props.data.content; - // 未发布文章直接返回 status = 2 已发布 - if(!content || props.data.status !== 2) { - return content; - } + + return content; - // 插入文案 - const insertText = `中证参考海外资讯${dayjs(props.data.publishTime).format('MM月DD日')}援引${props.data.source}`; - const dom = new DOMParser().parseFromString(content, "text/html"); - const body = dom.querySelector("body"); - const p = body?.childNodes; - for(let i = 0; i < p.length; i++){ - const textNode = getFirstTextNode(p[i]); - console.log(textNode) - if(textNode){ - textNode.textContent = insertText + textNode.textContent; - break; - } - } - return body?.innerHTML; + // 暂时不上线文案插入功能,后续如果有需要再打开 + // // 未发布文章直接返回 status = 2 已发布 + // if(!content || props.data.status !== 2) { + // return content; + // } + + // // 插入文案 + // const insertText = `中证参考海外资讯${dayjs(props.data.publishTime).format('MM月DD日')}援引${props.data.source}`; + // const dom = new DOMParser().parseFromString(content, "text/html"); + // const body = dom.querySelector("body"); + // const p = body?.childNodes; + // for(let i = 0; i < p.length; i++){ + // const textNode = getFirstTextNode(p[i]); + // console.log(textNode) + // if(textNode){ + // textNode.textContent = insertText + textNode.textContent; + // break; + // } + // } + // return body?.innerHTML; });