feat: 人工服务结束时在消息列表中添加提示消息
This commit is contained in:
parent
751c130657
commit
3e6016fa47
|
|
@ -842,13 +842,34 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.succeed) {
|
if (res.succeed) {
|
||||||
this.$store.commit("set_IsTransferChat", false);
|
this.$store.commit("set_IsTransferChat", false);
|
||||||
this.$u.toast("会话已结束");
|
// 往消息里push一个结束会话的消息
|
||||||
|
this.$store.commit(
|
||||||
|
"push_AiMsg",
|
||||||
|
this.createLocalTipTextMessage("人工服务已结束"),
|
||||||
|
);
|
||||||
|
// this.$u.toast("会话已结束");
|
||||||
} else {
|
} else {
|
||||||
this.$u.toast(res.error || "会话结束失败");
|
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) {
|
createLocalUserTextMessage(messageText) {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue