对话阅读时间

This commit is contained in:
kuaifan 2021-06-23 00:16:44 +08:00
parent bbb73544ea
commit 24345ef6c6
2 changed files with 10 additions and 1 deletions

View File

@ -202,6 +202,11 @@ export default {
},
}).then(({data}) => {
this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
this.$store.dispatch("saveDialog", {
id: this.dialogId,
last_msg: data,
last_at: $A.formatDate("Y-m-d H:i:s")
});
this.$store.dispatch("saveDialogMsg", data);
}).catch(({msg}) => {
$A.modalError(msg);

View File

@ -1277,7 +1277,11 @@ export default {
// 更新最后消息
let dialog = state.dialogs.find(({id}) => id == dialog_id);
if (dialog) {
dialog.last_msg = data;
dispatch("saveDialog", {
id: dialog_id,
last_msg: data,
last_at: state.method.formatDate("Y-m-d H:i:s")
});
} else {
dispatch("getDialogOne", dialog_id);
}