From 2e7c50e76f999e64992e7a9a20e2998481b880d0 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 2 Apr 2024 10:20:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=A8=A1=E6=9D=BF=E5=8F=82=E6=95=B0?= =?UTF-8?q?=E9=94=99=E8=AF=AF.=20=E5=8F=82=E6=95=B0=E5=86=85=E4=B8=8D?= =?UTF-8?q?=E5=8F=AF=E6=8D=A2=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/channel/whatsappUtils.js | 3 ++- .../Conversations/Online/Input/Template.jsx | 19 ++----------------- 2 files changed, 4 insertions(+), 18 deletions(-) diff --git a/src/channel/whatsappUtils.js b/src/channel/whatsappUtils.js index d5c9a1f..d987438 100644 --- a/src/channel/whatsappUtils.js +++ b/src/channel/whatsappUtils.js @@ -570,7 +570,7 @@ export const parseRenderMessageList = (messages) => { : {}), titleColor: msg.messageorigin_AsJOSN?.customerProfile?.name ? '#a791ff' : "#128c7e", // titleColor: msg.messageorigin_direction === 'inbound' ? '#a791ff' : "#128c7e", - id: msgContent.context?.id || msgContent?.message_id || msgContent.reaction?.message_id, + id: msgContent.context?.id || msgContent.context?.message_id || msgContent.reaction?.message_id, }, origin: msg.messageorigin_AsJOSN, }), @@ -582,6 +582,7 @@ export const parseRenderMessageList = (messages) => { }; export const whatsappError = { 'BAD_REQUEST': '无法发送, 请使用邮件联系.', + '100': '参数错误, 请联系技术组', '131026': '[131026] 消息无法投递(未注册/使用旧版/未同意政策).\n请稍后重试或使用邮件联系', '131047': '[131047] 会话超过24小时或未激活. \n请使用模板消息发送', '131053': '[131053] 文件上传失败.', diff --git a/src/views/Conversations/Online/Input/Template.jsx b/src/views/Conversations/Online/Input/Template.jsx index b24f214..4b80154 100644 --- a/src/views/Conversations/Online/Input/Template.jsx +++ b/src/views/Conversations/Online/Input/Template.jsx @@ -157,35 +157,20 @@ const InputTemplate = ({ mobile, disabled = false, invokeSendMessage }) => { {ele} - ) : ((ele.key.includes('free') || ele.key.includes('detail')) ? ( - { - onInput(tempItem, ele.key, e.target.value, paramsVal); - }} - className={`w-full block ${paramsVal[ele.key] ? 'max-w-24' : 'max-w-60'}`} - size={'small'} - title={ele.key} - placeholder={paramsVal[ele.key] || ele.key} - defaultValue={paramsVal[ele.key] || ''} - // onPressEnter={() => handleSendTemplate(tempItem)} - /> ) : ( { onInput(tempItem, ele.key, e.target.value, paramsVal); }} - className={`w-auto ${paramsVal[ele.key] ? 'max-w-24' : 'max-w-60'}`} + className={ele.key.includes('free') || ele.key.includes('detail') ? `w-full block ` : `w-auto ${paramsVal[ele.key] ? 'max-w-24' : 'max-w-60'}`} size={'small'} title={ele.key} placeholder={paramsVal[ele.key] || ele.key} defaultValue={paramsVal[ele.key] || ''} // onPressEnter={() => handleSendTemplate(tempItem)} /> - )) + ) )} );