新会话调整

This commit is contained in:
dong 2023-05-25 15:09:02 +08:00
parent 94c8f30305
commit 6d18d374a4

View File

@ -244,6 +244,17 @@ export default {
totalUnread() {
this.$emit('setTotalUnread', this.totalUnread);
},
dialogVisible() {
if (this.dialogVisible && this.id) {
const index = this.groupList.findIndex(item => {
return item.id == this.id;
});
if (index > -1 && this.getBadge(this.groupList[index].messageList)) {
this.setReadGroup();
this.scrollTop(index);
}
}
},
myMemberId: {
handler(val) {
this.initGroupList();
@ -557,7 +568,7 @@ export default {
return pId;
},
setReadGroup() {
if (!this.id) { return; }
if (!this.id || !this.dialogVisible) { return; }
const id = this.id;
setGroupReadMessage(this.groupId, {id}).then(res => {
res.data.forEach(item => {