Parcourir la source

Merge branch 'beta'

lsc il y a 3 semaines
Parent
commit
9033b8d411

+ 1 - 1
dist/index.html

@@ -27,7 +27,7 @@
     html,
     body{
       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.ac3b5723dad131bcb92a54e4e21f58cc.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.b0f7536b96169e4e25d7.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.ac3b5723dad131bcb92a54e4e21f58cc.css


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/css/app.ac3b5723dad131bcb92a54e4e21f58cc.css.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.b0f7536b96169e4e25d7.js


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/app.b0f7536b96169e4e25d7.js.map


Fichier diff supprimé car celui-ci est trop grand
+ 0 - 0
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js.map


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

@@ -51,7 +51,6 @@
       src="https://beta.cloud.cocorobo.cn/browser/public/index1.html"
       ref="iiframe2"
       v-show="false"
-      v-if="show"
     ></iframe>
 
 		<mini-audio
@@ -104,6 +103,11 @@ export default {
       this.aiText = "";
       this.userText = "";
       this.stopRecord();
+      if(this.curRequestController){
+          this.curRequestController.abort();
+          console.log("请求已终止");
+          this.curRequestController = null;
+      }
 		},
 		stopOne(){
 			if(this.source){
@@ -112,12 +116,18 @@ export default {
 			}
 			if (this.talkLoading) {
         this.stopTalk();
+      }
+      if(this.curRequestController){
+          this.curRequestController.abort();
+          console.log("请求已终止");
+          this.curRequestController = null;
       }
 			this.showIndex = 0;
 			this.showTextIndex = 0;
 			this.aiText = "您好,我是小可,有什么可以帮助您的?";
 			this.aiStatus = 0;
 			this.chatLoading = false;
+
 		},
     recordStart(_text) {
       var OpenCC = require("opencc-js");
@@ -132,7 +142,7 @@ export default {
         return this.$message.info("已开启语音助手,无需重复开启");
       let iiframe = this.$refs["iiframe"];
       iiframe.contentWindow.window.document.getElementById(
-        "languageOptions"
+       "languageOptions"
       ).selectedIndex = 2; //普通话
       iiframe.contentWindow.testdoContinuousPronunciationAssessment();
 			//this.talkTextList.push("我在");
@@ -153,7 +163,7 @@ export default {
       iiframe.contentWindow.onRecognizedResult = e => {
         let _msg = converter(e.privText);
         // let _msg2 = e.privText;
-        // let _msg = _text;
+        // let _msg = "你好呀!";
         console.log("👇");
         console.log(_msg);
         // _msg = converter(_msg)
@@ -416,9 +426,6 @@ export default {
         iiframe.contentWindow.window.document
           .getElementById("scenarioStopButton")
           .click();
-          if (this.talkLoading) {
-            this.$refs.iiframe2.contentWindow.closesynthesizer();
-          }
         // this.stopTalk();
         // 录音借宿
         iiframe.contentWindow.onSessionStopped = (s, e) => {
@@ -434,9 +441,17 @@ export default {
           this.userText = "";
           this.aiText = "";
         };
-       
+
       } catch (error) {
+        console.log(error)
+        this.isOpen = false;
+        this.show = false;
+        this.showTextIndex = 3;
+        this.showIndex = 2;
         this.$parent.changeRecordType(0);
+        this.$message.success("已关闭语音助手");
+        this.userText = "";
+        this.aiText = "";
       }
 
     },

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

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

+ 5 - 1
src/components/components/cocoFlowDia.vue

@@ -48,7 +48,11 @@ import MarkdownIt from "markdown-it";
         computed: {
             MarkdownT() {
                 return function (c) {
-                    let md = new MarkdownIt();
+                    let md = new MarkdownIt({
+  html: true, // 允许渲染 HTML
+  linkify: true, // 自动将URL链接转化为可点击链接
+  typographer: true, // 启用排版规则(如替换 `"` 为 “)
+});
                     return c
                     ? md.render(c) : "";
                 };

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff