Browse Source

Merge branch 'beta' of https://git.cocorobo.cn/CocoRoboLabs/pbl-student-table into beta

lsc 8 months ago
parent
commit
76f1be2c96

+ 8 - 12
src/components/classRoomHelper/component/dialogArea.vue

@@ -461,11 +461,12 @@ export default {
       this.sendFnType = newValue;
     },
     talk() {
-      this.isTalk = true;
+			let iiframe = this.$refs["iiframe"];
       iiframe.contentWindow.window.document.getElementById(
         "languageOptions"
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
+			this.isTalk = true;
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = e.privText;
         if (!_msg) this.text += _msg;
@@ -1128,16 +1129,6 @@ export default {
     },
     aiTalk(type = 0) {
       //0 新的  1继续
-      if (!this.openMegaphone) {
-        try {
-          _talkTextIiframe2.contentWindow.closesynthesizer();
-          _talkTextIiframe2.contentWindow.pausesynthesizer();
-          this.aiIsTalk = false;
-        } catch (error) {
-          this.aiIsTalk = false;
-        }
-        return;
-      }
       if (type == 0 && this.aiIsTalk) {
         let _talkTextIiframe2 = this.$refs.iiframe2;
         try {
@@ -1168,7 +1159,12 @@ export default {
           );
         } else {
           this.aiIsTalk = false;
-          _talkTextIiframe2.contentWindow.closesynthesizer();
+          try {
+						_talkTextIiframe2.contentWindow.closesynthesizer();
+					} catch (error) {
+						return
+						
+					}
         }
       }
 

+ 10 - 13
src/components/classRoomHelper/component/searchArea.vue

@@ -819,11 +819,13 @@ export default {
       }
     },
     talk() {
-      this.isTalk = true;
+      
+			let iiframe = this.$refs["iiframe"];
       iiframe.contentWindow.window.document.getElementById(
         "languageOptions"
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
+			this.isTalk = true;
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = e.privText;
         if (!_msg) this.text += _msg;
@@ -2377,16 +2379,6 @@ ${_wordData}
     },
     aiTalk(type = 0) {
       //0 新的  1继续
-			if(!this.openMegaphone){
-				try {
-					_talkTextIiframe2.contentWindow.closesynthesizer();
-        	_talkTextIiframe2.contentWindow.pausesynthesizer();
-					this.aiIsTalk = false;
-				} catch (error) {
-					this.aiIsTalk = false;
-				}
-				return
-			}
       if (type == 0 && this.aiIsTalk) {
 				let _talkTextIiframe2 = this.$refs.iiframe2;
 				_talkTextIiframe2.contentWindow.pausesynthesizer();
@@ -2409,9 +2401,14 @@ ${_wordData}
 							this.aiIsTalk = false;
 						}
         	);
-        
         } else {
-					_talkTextIiframe2.contentWindow.closesynthesizer();
+					this.aiIsTalk = false;
+          try {
+						_talkTextIiframe2.contentWindow.closesynthesizer();
+					} catch (error) {
+						return
+						
+					}
         }
       }
 

+ 8 - 12
src/components/classRoomHelper/component/taskArea.vue

@@ -476,11 +476,12 @@ export default {
       this.sendFnType = newValue;
     },
     talk() {
-      this.isTalk = true;
+      let iiframe = this.$refs["iiframe"];
       iiframe.contentWindow.window.document.getElementById(
         "languageOptions"
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
+			this.isTalk = true;
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = e.privText;
         if (!_msg) this.text += _msg;
@@ -1282,16 +1283,6 @@ Instruction: Based on the context, follow "Format example", write content.
     },
     aiTalk(type = 0) {
       //0 新的  1继续
-      if (!this.openMegaphone) {
-        try {
-          _talkTextIiframe2.contentWindow.closesynthesizer();
-          _talkTextIiframe2.contentWindow.pausesynthesizer();
-          this.aiIsTalk = false;
-        } catch (error) {
-          this.aiIsTalk = false;
-        }
-        return;
-      }
       if (type == 0 && this.aiIsTalk) {
         let _talkTextIiframe2 = this.$refs.iiframe2;
         try {
@@ -1322,7 +1313,12 @@ Instruction: Based on the context, follow "Format example", write content.
           );
         } else {
           this.aiIsTalk = false;
-          _talkTextIiframe2.contentWindow.closesynthesizer();
+          try {
+						_talkTextIiframe2.contentWindow.closesynthesizer();
+					} catch (error) {
+						return
+
+					}
         }
       }