From 21ebf6043514c24ea6a0711c32b600c9177e90c1 Mon Sep 17 00:00:00 2001 From: DCloud_JSON Date: Tue, 7 May 2024 15:28:03 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E5=86=85=E5=AE=B9=E5=8C=85=E5=90=AB=E5=85=B3?= =?UTF-8?q?=E9=94=AE=E8=AF=8D=E2=80=9C=E4=B8=AA=E6=8E=A8=E2=80=9D=E6=97=B6?= =?UTF-8?q?=E4=BC=9A=E8=A2=AB=E6=8B=A6=E6=88=AA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/chat.nvue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pages/chat/chat.nvue b/pages/chat/chat.nvue index 11f7c81..18fa156 100644 --- a/pages/chat/chat.nvue +++ b/pages/chat/chat.nvue @@ -1246,6 +1246,13 @@ let index = this.conversation.msgList.findIndex(i => i.unique_id == msg.unique_id) // 生成新对象,否则不触发更新 msg = Object.assign({}, msg) + + // 检查内容不是包含 个推 两个字,有则 改成 个 + 零宽字符 + 推 + let tmpBody = JSON.stringify(msg.body) + if(tmpBody.includes('个推')){ + msg.body = JSON.parse(tmpBody.replace(/个推/g,'个\u200b推')) + } + uniImCo.sendMsg(msg) .then(async e => { // console.log('uniImCo.sendMsg',{e,msg}); -- GitLab