SanHQin 3 weeks ago
parent
commit
a9faead1ea

+ 1 - 1
dist/index.html

@@ -32,7 +32,7 @@
       width: 100%;
       background: #e6eaf0;
       font-family: '黑体';
-    }</style><link href=./static/css/app.467ce858ba3130e7e60fa13248904ed9.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.dfc8a8e3392292c7b8e5.js></script><script type=text/javascript src=./static/js/app.8ce1e96738e32d4802d0.js></script></body></html><script>function stopSafari() {
+    }</style><link href=./static/css/app.686a8690c748ae958fa0956cbd7e1edd.css rel=stylesheet></head><body><div id=app></div><script type=text/javascript src=./static/js/manifest.23ea04dc469b57e2b4f8.js></script><script type=text/javascript src=./static/js/vendor.dfc8a8e3392292c7b8e5.js></script><script type=text/javascript src=./static/js/app.9a0f725b5bc8aa66873e.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.686a8690c748ae958fa0956cbd7e1edd.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/app.686a8690c748ae958fa0956cbd7e1edd.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/workPage.b4e54979ac964d5c923286fd86454a31.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/css/workPage.b4e54979ac964d5c923286fd86454a31.css.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9a0f725b5bc8aa66873e.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.9a0f725b5bc8aa66873e.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/manifest.23ea04dc469b57e2b4f8.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage-manifest.2ece51fa34be51c8610a.js.map


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.0d480fbe3d27dcaf6dba.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.b0d12ca4ebecc9e82ecf.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/workPage.b0d12ca4ebecc9e82ecf.js.map


+ 1 - 1
dist/workPage.html

@@ -1,4 +1,4 @@
-<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.16225b6f1c71ffda7fcda0adb4203bfa.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.0c46d4deebf81c844386.js></script><script type=text/javascript src=./static/js/workPage.0d480fbe3d27dcaf6dba.js></script></body></html><script>function stopSafari() {
+<!DOCTYPE html><html><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1"><title>工作页面 - CocoFlow</title><link rel=icon href=../static/logo.ico><link href=./static/css/workPage.b4e54979ac964d5c923286fd86454a31.css rel=stylesheet></head><body><noscript><strong>We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id=app></div><script type=text/javascript src=./static/js/workPage-manifest.2ece51fa34be51c8610a.js></script><script type=text/javascript src=./static/js/workPage-vendor.0c46d4deebf81c844386.js></script><script type=text/javascript src=./static/js/workPage.b0d12ca4ebecc9e82ecf.js></script></body></html><script>function stopSafari() {
     //阻止safari浏览器双击放大功能
     let lastTouchEnd = 0  //更新手指弹起的时间
     document.documentElement.addEventListener("touchstart", function (event) {

+ 12 - 7
src/components/pages/workPage/components/questionsAndAnswers.vue

@@ -148,14 +148,15 @@ export default {
     },
     stopRecord() {
       console.log("测试测试")
-      // if(new Date().getTime() - this.recordObj.startTime < 2000){
-      //   return console.log("稍等")
-      // }
+      if(new Date().getTime() - this.recordObj.startTime < 2000){
+        return console.log("稍等")
+      }
       // 判断浏览器是否有开启录音权限
       navigator.permissions && navigator.permissions.query({ name: 'microphone' }).then(permissionStatus => {
         if (permissionStatus.state !== "granted") {
           // 没有开启录音权限,直接确定停止录音
           this.recordObj.status = "0";
+          this.recordObj.loading = false;
           let iframe = this.$refs["iframeRef"];
           iframe.contentWindow.onSessionStopped = null;
           iframe.contentWindow.window.onRecognizedResult = null;
@@ -165,28 +166,32 @@ export default {
         }
         console.log("测试测试222")
         // 有权限再判断状态
-        if(this.recordObj.status=='1'){
+        if(this.recordObj.status=='1' && !this.recordObj.loading){
           console.log("测试测3333")
           let iframe = this.$refs["iframeRef"];
+          this.recordObj.loading = true;
           iframe.contentWindow.window.document
             .getElementById("scenarioStopButton")
             .click();
           iframe.contentWindow.onSessionStopped = (s, e) => {
             this.recordObj.status = "0"
+            this.recordObj.loading = false;
             this.$message.success("已停止录音")
             iframe.contentWindow.onSessionStopped = null;
             iframe.contentWindow.window.onRecognizedResult = null;
           };
         }else{
           this.recordObj.status = "0";
-          let iframe = this.$refs["iframeRef"];
-          iframe.contentWindow.onSessionStopped = null;
-          iframe.contentWindow.window.onRecognizedResult = null;
+        this.recordObj.loading = false;
+        let iframe = this.$refs["iframeRef"];
+        iframe.contentWindow.onSessionStopped = null;
+        iframe.contentWindow.window.onRecognizedResult = null;
         }
       }).catch(() => {
         console.log("测试测4444试")
         // 浏览器不支持或异常,默认直接停止
         this.recordObj.status = "0";
+        this.recordObj.loading = false;
         let iframe = this.$refs["iframeRef"];
         iframe.contentWindow.onSessionStopped = null;
         iframe.contentWindow.window.onRecognizedResult = null;

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