SanHQin 8 maanden geleden
bovenliggende
commit
f558febada

+ 1 - 0
index.html

@@ -5,6 +5,7 @@
   <meta charset="utf-8">
   <meta name="viewport" content="width=device-width,initial-scale=1.0">
   <title>pbl-student</title>
+	<base target="_blank">
   <style>
      /* @charset "utf-8";
      @font-face {

File diff suppressed because it is too large
+ 6 - 3
src/components/classRoomHelper/component/dialogArea.vue


+ 47 - 10
src/components/classRoomHelper/component/levitatedSphere.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="levitatedSphere" v-show="show">
-    <div class="ls_hello" v-if="showIndex == 0">
+    <div :class="['ls_hello']" v-show="showIndex == 0">
       <el-image
         style="width: 100%; height: 100%"
         v-show="aiStatus == 1"
@@ -115,6 +115,8 @@ export default {
         } else if (this.show == true) {
           if (this.showTextIndex == 2 || this.chatLoading || this.talkLoading) {
             return console.log("组织语言中");
+					// }else if(_msg.indexOf('可可同学') && _msg.indexOf("停止")){
+					// 	this.stopTalk();
           } else {
             this.showTextIndex = 1;
             this.aiText = "";
@@ -235,11 +237,13 @@ export default {
       iiframe.contentWindow.window.document
         .getElementById("scenarioStopButton")
         .click();
+			// this.stopTalk();
       // 录音借宿
       iiframe.contentWindow.onSessionStopped = (s, e) => {
         this.isOpen = false;
         this.show = false;
         this.showTextIndex = 3;
+				this.showIndex = 2;
         this.$parent.changeRecordType(0);
         this.$message.success("已关闭语音助手");
         if (this.talkLoading) {
@@ -388,15 +392,20 @@ export default {
           clearTimeout(this.timer);
           this.timer = null;
         }
-        // console.log(`👉转语音:${_text}`);
+        console.log(`👉转语音:${_text}`);
+				if(this.talkTextList.length==0){
+					console.log("👉最后一个了,执行结束 👈")
+					_talkTextIiframe2.contentWindow.closesynthesizer();
+				}
         // setTimeout(()=>{
         // 	this.talkText();
         // },2000)
-        _talkTextIiframe2.contentWindow.texttospeech(_text, this.talkText);
-      } else {
-        console.log("👉转语音结束👈");
-        _talkTextIiframe2.contentWindow.closesynthesizer();
-        this.talkLoading = false;
+        _talkTextIiframe2.contentWindow.texttospeech(_text, this.talkText,this.endTalk);
+      }
+			//  else {
+      //   console.log("👉转语音结束👈");
+      //   _talkTextIiframe2.contentWindow.closesynthesizer();
+      //   this.talkLoading = false;
         // this.timer = setTimeout(() => {
         //   this.showTextIndex = 3;
         //   this.aiStatus = 2;
@@ -404,8 +413,23 @@ export default {
         //   this.userText = "";
         // 	this.time = null;
         // }, 5000);
-      }
-    }
+      // }
+    },
+		endTalk(){
+			console.log("👉转语音结束👈");
+			// let _talkTextIiframe2 = this.$refs.iiframe2;
+			// _talkTextIiframe2.contentWindow.closesynthesizer();
+			this.talkLoading = false;
+		},
+		stopTalk(){
+			this.talkTextList = [];
+			let _talkTextIiframe2 = this.$refs.iiframe2;
+			_talkTextIiframe2.contentWindow.closesynthesizer();
+			this.talkLoading = false;
+			// this.talkLoading = false;
+			// let _talkTextIiframe2 = this.$refs.iiframe2;
+			// _talkTextIiframe2.contentWindow.closesynthesizer();
+		},
   },
   mounted() {
     // // this.recordStart()
@@ -417,7 +441,7 @@ export default {
     // 			this.recordStart("位于哪里。他温度怎么样。")
     // 		},2000)
     // 	},2000)
-    // },2000)
+    // },5000)
   }
 };
 </script>
@@ -439,6 +463,19 @@ export default {
   position: absolute;
   top: 0;
   right: 0;
+	animation: smallToBig 1s both;
+}
+
+/* 定义渐入动画 */
+@keyframes smallToBig {
+    from {
+        opacity: 0;
+        transform: scale(0.1);
+    }
+    to {
+        opacity: 1;
+        transform: scale(1);
+    }
 }
 
 .ls_text {

File diff suppressed because it is too large
+ 59 - 38
src/components/classRoomHelper/component/searchArea.vue


File diff suppressed because it is too large
+ 6 - 3
src/components/classRoomHelper/component/taskArea.vue


Some files were not shown because too many files changed in this diff