From edf5abcec998e2e0696f18f93f22d3850309ce56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B6=85=E7=BA=A7=E8=80=81=E7=99=BD=E5=85=94?= Date: Wed, 15 Oct 2025 14:37:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=B6=88=E6=81=AF=E8=AE=B0?= =?UTF-8?q?=E5=BD=95=E7=BB=84=E4=BB=B6=E5=AF=B9=E7=89=B9=E5=AE=9A=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=B1=BB=E5=9E=8B=E7=9A=84=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91=EF=BC=8C=E6=94=AF=E6=8C=81=E8=A7=A3=E6=9E=90JSON?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=86=85=E5=AE=B9=E5=B9=B6=E4=BC=98=E5=85=88?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E8=A7=A3=E6=9E=90=E5=90=8E=E7=9A=84=E5=86=85?= =?UTF-8?q?=E5=AE=B9=EF=BC=9B=E4=BC=98=E5=8C=96=E6=B6=88=E6=81=AF=E8=BF=87?= =?UTF-8?q?=E6=BB=A4=E6=9D=A1=E4=BB=B6=EF=BC=8C=E7=A1=AE=E4=BF=9D=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E5=B1=95=E7=A4=BA=E6=B6=88=E6=81=AF=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/MessageRecord/index.tsx | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageRecord/index.tsx b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageRecord/index.tsx index d5dd6df1..0d31d6aa 100644 --- a/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageRecord/index.tsx +++ b/Touchkebao/src/pages/pc/ckbox/weChat/components/ChatWindow/components/MessageRecord/index.tsx @@ -757,9 +757,34 @@ const MessageRecord: React.FC = ({ contract }) => { dangerouslySetInnerHTML={{ __html: msg.content }} > ))} + + {group.messages + .filter(v => [570425393].includes(v.msgType)) + .map(msg => { + // 解析JSON字符串 + let displayContent = msg.content; + try { + const parsedContent = JSON.parse(msg.content); + if ( + parsedContent && + typeof parsedContent === "object" && + parsedContent.content + ) { + displayContent = parsedContent.content; + } + } catch (error) { + // 如果解析失败,使用原始内容 + displayContent = msg.content; + } + return ( +
+ {displayContent} +
+ ); + })}
{group.time}
{group.messages - .filter(v => ![10000].includes(v.msgType)) + .filter(v => ![10000, 570425393].includes(v.msgType)) .map(msg => { return renderMessage(msg); })}