feat: 人工服务结束时在消息列表中添加提示消息

This commit is contained in:
yangzhe 2026-03-20 16:47:26 +08:00
parent 751c130657
commit 3e6016fa47
1 changed files with 22 additions and 1 deletions

View File

@ -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 {