no message

This commit is contained in:
kuaifan 2021-06-24 16:10:17 +08:00
parent 3aa90f7006
commit d64705ab32
2 changed files with 10 additions and 10 deletions

View File

@ -289,9 +289,9 @@ export default {
sendSuccess(data) {
this.$store.dispatch("saveDialogMsg", data);
this.$store.dispatch("updateDialogLastMsg", data);
this.$store.dispatch("moveDialogTop", this.dialogId);
this.$store.dispatch("increaseTaskMsgNum", this.dialogId);
this.$store.dispatch("moveDialogTop", this.dialogId);
this.$store.dispatch("updateDialogLastMsg", data);
},
chatScroll(res) {

View File

@ -1379,12 +1379,12 @@ export default {
// 更新消息列表
state.dialogMsgPush = data;
dispatch("saveDialogMsg", data)
if (mode === "chat") {
return;
}
// 更新最后消息
dispatch("updateDialogLastMsg", data);
if (mode === "add") {
if (mode === "add" || mode === "chat") {
// 新增任务消息数量
dispatch("increaseTaskMsgNum", dialog_id);
if (mode === "chat") {
return;
}
let dialog = state.dialogs.find(({id}) => id == data.dialog_id);
// 更新对话列表
if (dialog) {
@ -1393,9 +1393,9 @@ export default {
// 移动到首位
dispatch("moveDialogTop", dialog_id);
}
// 新增任务消息数量
dispatch("increaseTaskMsgNum", dialog_id);
}
// 更新最后消息
dispatch("updateDialogLastMsg", data);
})(msgDetail);
break;