From a4ee71141839dd1ae74a7d2baa0494637a101541 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Thu, 19 Mar 2026 17:29:49 +0800 Subject: [PATCH] =?UTF-8?q?fix(chat):=20=E4=BF=AE=E5=A4=8D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=98=BE=E7=A4=BA=E9=80=BB=E8=BE=91=E5=B9=B6=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=8F=91=E9=80=81=E5=A4=B1=E8=B4=A5=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/chat/index.vue | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/pages/chat/index.vue b/pages/chat/index.vue index 7278db6..e1c078c 100644 --- a/pages/chat/index.vue +++ b/pages/chat/index.vue @@ -118,10 +118,18 @@ {{ formatShowTime(message.sendDate) }} + + + + {{ message.message }} + + @@ -137,7 +145,11 @@ { - console.log(res, "发送消息成功"); if (res.succeed) { // 添加到消息列表 const msgUserData = { @@ -331,6 +342,14 @@ export default { // this.$nextTick(() => { // this.scrollToBottom(); // }); + } else { + // 清空输入框 + this.messageValue = ""; + // 发送失败 + uni.showToast({ + title: res.error || "发送失败", + icon: "none", + }); } }) .catch((error) => { @@ -568,6 +587,12 @@ export default { color: #999999; padding: 20rpx; } + .message-tip { + text-align: center; + font-size: 24rpx; + color: #999999; + padding-bottom: 40rpx; + } .message-left, .message-right {