Преглед изворни кода

语音助手关闭打开的问题

SanHQin пре 3 месеци
родитељ
комит
baa6539854

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     html,
     body{
     body{
       font-family: '黑体';
       font-family: '黑体';
-    }</style><link href=./static/css/app.868d2882869ea487473eb3d35a3f5458.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.acbd8cb5870df69e0141.js></script><script type=text/javascript src=./static/js/app.ca85a1e3c492365bbf88.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.76bea7874060d3c581888e4b0f005f14.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.3ad1d5771e9b13dbdad2.js></script><script type=text/javascript src=./static/js/vendor.acbd8cb5870df69e0141.js></script><script type=text/javascript src=./static/js/app.bbf8a329a502c3016aac.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {
     document.documentElement.addEventListener("touchstart", function (event) {

Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.76bea7874060d3c581888e4b0f005f14.css


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/css/app.76bea7874060d3c581888e4b0f005f14.css.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.bbf8a329a502c3016aac.js


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/app.bbf8a329a502c3016aac.js.map


Разлика између датотеке није приказан због своје велике величине
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


+ 11 - 7
src/components/classRoomHelper/component/levitatedSphere.vue

@@ -51,7 +51,6 @@
       src="https://beta.cloud.cocorobo.cn/browser/public/index1.html"
       src="https://beta.cloud.cocorobo.cn/browser/public/index1.html"
       ref="iiframe2"
       ref="iiframe2"
       v-show="false"
       v-show="false"
-      v-if="show"
     ></iframe>
     ></iframe>
 
 
 		<mini-audio
 		<mini-audio
@@ -132,7 +131,7 @@ export default {
         return this.$message.info("已开启语音助手,无需重复开启");
         return this.$message.info("已开启语音助手,无需重复开启");
       let iiframe = this.$refs["iiframe"];
       let iiframe = this.$refs["iiframe"];
       iiframe.contentWindow.window.document.getElementById(
       iiframe.contentWindow.window.document.getElementById(
-        "languageOptions"
+       "languageOptions"
       ).selectedIndex = 2; //普通话
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
 			//this.talkTextList.push("我在");
 			//this.talkTextList.push("我在");
@@ -153,7 +152,7 @@ export default {
       iiframe.contentWindow.onRecognizedResult = e => {
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = converter(e.privText);
         let _msg = converter(e.privText);
         // let _msg2 = e.privText;
         // let _msg2 = e.privText;
-        // let _msg = _text;
+        // let _msg = "你好呀!";
         console.log("👇");
         console.log("👇");
         console.log(_msg);
         console.log(_msg);
         // _msg = converter(_msg)
         // _msg = converter(_msg)
@@ -416,9 +415,6 @@ export default {
         iiframe.contentWindow.window.document
         iiframe.contentWindow.window.document
           .getElementById("scenarioStopButton")
           .getElementById("scenarioStopButton")
           .click();
           .click();
-          if (this.talkLoading) {
-            this.$refs.iiframe2.contentWindow.closesynthesizer();
-          }
         // this.stopTalk();
         // this.stopTalk();
         // 录音借宿
         // 录音借宿
         iiframe.contentWindow.onSessionStopped = (s, e) => {
         iiframe.contentWindow.onSessionStopped = (s, e) => {
@@ -434,9 +430,17 @@ export default {
           this.userText = "";
           this.userText = "";
           this.aiText = "";
           this.aiText = "";
         };
         };
-       
+
       } catch (error) {
       } catch (error) {
+        console.log(error)
+        this.isOpen = false;
+        this.show = false;
+        this.showTextIndex = 3;
+        this.showIndex = 2;
         this.$parent.changeRecordType(0);
         this.$parent.changeRecordType(0);
+        this.$message.success("已关闭语音助手");
+        this.userText = "";
+        this.aiText = "";
       }
       }
 
 
     },
     },

+ 6 - 6
src/components/classRoomHelper/index.vue

@@ -900,12 +900,12 @@ ${_textData}
       });
       });
     },
     },
     startAssistant() {
     startAssistant() {
-      if(this.isBtn) return this.$message.info("点击过快,请稍等...");
-      this.isBtn = true
-      setTimeout(() => {
-          this.isBtn = false
-      }, 1000);
-      
+      // if(this.isBtn) return this.$message.info("点击过快,请稍等...");
+      // this.isBtn = true
+      // setTimeout(() => {
+      //     this.isBtn = false
+      // }, 1000);
+
       if (this.recordLoading) return this.$message.info("请稍等...");
       if (this.recordLoading) return this.$message.info("请稍等...");
       this.recordLoading = true;
       this.recordLoading = true;
       if (this.recordType == 0) {
       if (this.recordType == 0) {

Неке датотеке нису приказане због велике количине промена