语言来电铃声,语言其他BUG

This commit is contained in:
dong 2023-11-30 10:51:51 +08:00
parent 81c1806603
commit 6d2dd68108
2 changed files with 28 additions and 16 deletions

View File

@ -142,6 +142,7 @@ export default {
},
methods: {
stopNoReadPlay() {
this.play = false;
this.currentAudioList = [];
this.messageList.forEach(item => {
this.$set(item, 'activeAuto', false);
@ -275,10 +276,6 @@ export default {
},
//
stopRecording() {
if (this.seconds < 1) {
this.$message.info('录制语音时间太短!');
return;
}
this.audioPlay = true;
clearInterval(this.inter);
this.seconds = 0;
@ -407,6 +404,10 @@ export default {
}
}).catch(() => { console.error('操作失败!'); });
} else {
if (this.seconds < 1) {
this.$message.info('为保证语言质量录制时长不能小于1秒');
return;
}
this.stopRecording(); //
}
}

View File

@ -183,7 +183,10 @@ export default {
return item.id == val.id;
});
if (find) {
find.messageList.push(val.message);
const fMess = find.messageList.find(ii => ii.id == val.message.id);
if (!fMess) {
find.messageList.push(val.message);
}
if (!this.id && this.privateChatId && this.privateChatId == this.getPrivateChatId(find)) {
this.id = val.id;
}
@ -556,6 +559,10 @@ export default {
return objectIsEqual(m1.sort(), m2.sort());
},
groupClick(item) {
if (this.$refs.chatContentRef && this.$refs.chatContentRef.recordSending) {
this.$message.info('请结束正在录制的语音!');
return;
}
this.id = item.id || 0;
if (item.type == 'GROUP_CHAT') {
this.privateChatId = '';
@ -580,19 +587,23 @@ export default {
setReadGroup() {
if (!this.id || !this.dialogVisible) { return; }
const id = this.id;
setGroupReadMessage(this.groupId, {id}).then(res => {
res.data.forEach(item => {
const obj = {
id: id,
message: {
...item
}
};
this.getMessageStatus(obj);
});
});
this.$nextTick(() => {
this.$refs.chatContentRef && this.$refs.chatContentRef.playNoReadMessage();
setGroupReadMessage(this.groupId, {id}).then(() => {
const findG = this.groupList.find(item => {
return item.id == this.id;
});
if (findG) {
findG.messageList.forEach(ii => {
if (!ii.readerSet.includes(this.myMemberId)) {
ii.readerSet.push(this.myMemberId);
if (objectIsEqual(findG.memberList.sort(), ii.readerSet.sort())) {
ii.allRead = true;
}
}
});
}
});
});
},
handleClose() {