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