diff --git a/src/views/newMap/display/voiceChatBox/index.vue b/src/views/newMap/display/voiceChatBox/index.vue index 7c00cad97..5fc51474e 100644 --- a/src/views/newMap/display/voiceChatBox/index.vue +++ b/src/views/newMap/display/voiceChatBox/index.vue @@ -48,7 +48,7 @@ import teleRing from '@/assets/teleRing.mp3'; import ChatSetting from './chatSetting'; import ChatContent from './chatContent'; import RecordRTC from 'recordrtc'; -import {sendChatAudioBase64, overSimulationConversition, getAllConversition, acceptConversitionInvite} from '@/api/chat'; +import {sendChatAudioBase64, overSimulationConversition, getAllConversition, acceptConversitionInvite, sendChatText} from '@/api/chat'; import { getSessionStorage } from '@/utils/auth'; import { getSimulationMemberList, getAllSimulationUser } from '@/api/simulation'; import { OperationEvent } from '@/scripts/cmdPlugin/OperationHandler'; @@ -777,14 +777,16 @@ export default { }); }, sendText() { - // sendChatText(this.group, {content: this.textContent}).then(resp => { - // this.textContent = ''; - // }).catch((error) => { - // this.$message.error('发送会话文字失败:' + error.message); - // }); commitOperate(menuOperate.Conversation.Chat, {content: this.textContent}, 3).then(({valid})=>{ if (valid) { this.textContent = ''; + } else { + sendChatText(this.group, {content: this.textContent}).then(resp => { + this.textContent = ''; + if (this.$store.state.trainingNew.teachMode != 'TEST_MODE') { + this.$message.warning('发送会话文字不一致,请重新发送!' ); + } + }); } }).catch((error) => { this.$message.error('发送会话文字失败:' + error.message);