From 3e6016fa475610758cb808258873d661d7195df0 Mon Sep 17 00:00:00 2001 From: yangzhe Date: Fri, 20 Mar 2026 16:47:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BA=BA=E5=B7=A5=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=BB=93=E6=9D=9F=E6=97=B6=E5=9C=A8=E6=B6=88=E6=81=AF=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E4=B8=AD=E6=B7=BB=E5=8A=A0=E6=8F=90=E7=A4=BA=E6=B6=88?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/home/index/index.vue | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/pages/home/index/index.vue b/pages/home/index/index.vue index ceabb05..0e10573 100644 --- a/pages/home/index/index.vue +++ b/pages/home/index/index.vue @@ -842,13 +842,34 @@ export default { .then((res) => { if (res.succeed) { this.$store.commit("set_IsTransferChat", false); - this.$u.toast("会话已结束"); + // 往消息里push一个结束会话的消息 + this.$store.commit( + "push_AiMsg", + this.createLocalTipTextMessage("人工服务已结束"), + ); + // this.$u.toast("会话已结束"); } else { this.$u.toast(res.error || "会话结束失败"); } }); }, + // 创建本地提示消息 + createLocalTipTextMessage(messageText) { + return { + id: Math.random().toString(36).substring(2, 15), + message: messageText, + sendDate: "", + isSend: true, + isRead: false, + interactMode: 0, + messageType: 0, + timeLabel: 0, + displayTime: "", + sendUserType: 3, // 3 提示 + }; + }, + // 创建本地用户文本消息 createLocalUserTextMessage(messageText) { return {