代码调整

This commit is contained in:
dong 2022-12-01 18:20:25 +08:00
parent 0ffb424484
commit 49881dcbb0

View File

@ -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);