对话阅读时间
This commit is contained in:
parent
bbb73544ea
commit
24345ef6c6
@ -202,6 +202,11 @@ export default {
|
|||||||
},
|
},
|
||||||
}).then(({data}) => {
|
}).then(({data}) => {
|
||||||
this.tempMsgs = this.tempMsgs.filter(({id}) => id != tempId)
|
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);
|
this.$store.dispatch("saveDialogMsg", data);
|
||||||
}).catch(({msg}) => {
|
}).catch(({msg}) => {
|
||||||
$A.modalError(msg);
|
$A.modalError(msg);
|
||||||
|
6
resources/assets/js/store/actions.js
vendored
6
resources/assets/js/store/actions.js
vendored
@ -1277,7 +1277,11 @@ export default {
|
|||||||
// 更新最后消息
|
// 更新最后消息
|
||||||
let dialog = state.dialogs.find(({id}) => id == dialog_id);
|
let dialog = state.dialogs.find(({id}) => id == dialog_id);
|
||||||
if (dialog) {
|
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 {
|
} else {
|
||||||
dispatch("getDialogOne", dialog_id);
|
dispatch("getDialogOne", dialog_id);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user