SanHQin 11 月之前
父節點
當前提交
1a9677d5b2
共有 1 個文件被更改,包括 12 次插入13 次删除
  1. 12 13
      src/components/classRoomHelper/component/languageAssistant.vue

+ 12 - 13
src/components/classRoomHelper/component/languageAssistant.vue

@@ -177,7 +177,7 @@ export default {
   props: {},
   data() {
     return {
-      show: false,
+      show: true,
       showIndex: 2, //0 :在说话 1 : 接收 2:待命
       aiStatus: 0,
       aiText: "我是可可同学,我是个小小百事通,你有什么想和我聊一聊?",
@@ -216,18 +216,18 @@ export default {
     },
     recordStart(_text) {
       try {
-				// let iiframe = this.$refs["iiframe"];
-        // iiframe.contentWindow.window.document.getElementById(
-        //   "languageOptions"
-        // ).selectedIndex = 2; //普通话
-				// iiframe.contentWindow.testdoContinuousPronunciationAssessment();
+				let iiframe = this.$refs["iiframe"];
+        iiframe.contentWindow.window.document.getElementById(
+          "languageOptions"
+        ).selectedIndex = 2; //普通话
+				iiframe.contentWindow.testdoContinuousPronunciationAssessment();
         
-        // // return
-        // var OpenCC = require("opencc-js");
-        // let converter = OpenCC.Converter({
-        //   from: "hk",
-        //   to: "cn"
-        // });
+        // return
+        var OpenCC = require("opencc-js");
+        let converter = OpenCC.Converter({
+          from: "hk",
+          to: "cn"
+        });
 				this.show = true;
         this.showIndex = 0;
 				this.showTextIndex = 0;
@@ -236,7 +236,6 @@ export default {
         this.isOpen = true;
         this.show = true;
         this.aiText = "我是可可同学,我是个小小百事通,你有什么想和我聊一聊?";
-				return;
         iiframe.contentWindow.onRecognizedResult = e => {
           let _msg = converter(e.privText);