会话问题调整
This commit is contained in:
parent
4dff079c60
commit
2f5444e27f
@ -610,6 +610,7 @@ const socket = {
|
||||
commit('setSimulationWorkParam', data);
|
||||
},
|
||||
setConversationMessage: ({ commit }, message) => {
|
||||
console.log('----------------');
|
||||
commit('setConversationMessage', message);
|
||||
}
|
||||
}
|
||||
|
@ -95,9 +95,11 @@ export default {
|
||||
this.messageList = [];
|
||||
},
|
||||
'$store.state.socket.conversationMessage':function (val) { // 仿真聊天
|
||||
this.messageList.push(val);
|
||||
const message = {...val};
|
||||
this.messageList.push(message);
|
||||
console.log(val, '----------');
|
||||
if (val.memberId != this.myMemberId) {
|
||||
this.currentAudioList.push(val);
|
||||
this.currentAudioList.push(message);
|
||||
if (!this.isPlay) {
|
||||
this.playAllAudio();
|
||||
}
|
||||
@ -131,11 +133,12 @@ export default {
|
||||
this.$set(this.currentMessage, 'activeAuto', true);
|
||||
this.play = true;
|
||||
document.querySelector('#audioPlay').onended = () => {
|
||||
this.$set(this.currentMessage, 'activeAuto', false);
|
||||
if (!this.currentAudioList || !this.currentAudioList.length) {
|
||||
this.play = false;
|
||||
} else {
|
||||
this.playAllAudio();
|
||||
}
|
||||
this.$set(this.currentMessage, 'activeAuto', false);
|
||||
this.playAllAudio();
|
||||
};
|
||||
});
|
||||
},
|
||||
@ -425,6 +428,7 @@ export default {
|
||||
margin-top: 10px;
|
||||
display: inline-block;
|
||||
max-width: 80%;
|
||||
text-align: right;
|
||||
}
|
||||
.userHeader{margin-bottom: 2px;}
|
||||
.userName{font-size: 12px;display:inline-block;margin-right:10px;}
|
||||
|
Loading…
Reference in New Issue
Block a user