SanHQin 2 月之前
父節點
當前提交
6241e12823

+ 1 - 1
dist/index.html

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

文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.f6a23d13bf8d583d15c69b9f271e7180.css


文件差異過大導致無法顯示
+ 0 - 0
dist/static/css/app.f6a23d13bf8d583d15c69b9f271e7180.css.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.d3aa6c9e05f8d8364e4c.js


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/app.d3aa6c9e05f8d8364e4c.js.map


文件差異過大導致無法顯示
+ 0 - 0
dist/static/js/manifest.161e82026ac2ae03ab6f.js.map


+ 56 - 24
src/components/pages/classroomObservation/components/chatArea.vue

@@ -1699,30 +1699,66 @@ ${JSON.stringify(_list)}
               role: privSpeakerId,
               content: privText
             });
-            console.log(_getRoleList)
+            console.log(_getRoleList);
           }
 
-          console.log(_getRoleList.length >= 5 && !_getRoleLoading)
+          console.log(_getRoleList.length >= 5 && !_getRoleLoading);
           if (_getRoleList.length >= 5 && !_getRoleLoading) {
             try {
               let params = {
-              inputs: {
-                options: "老师,学生",
-                rows: JSON.stringify(
-                  _getRoleList.map(i => {
-                    return { content: i.content, role: i.role };
-                  })
-                )
-              },
-              response_mode: "blocking",
-              user: _this.userId
-            };
-            _getRoleLoading = true;
-            _this.ajax
-              .post("https://dify.cocorobo.cn/v1/workflows/run", params)
-              .then(res => {
-                let _runData = res.data;
-                let _runResult = _runData.outputs.result;
+                inputs: {
+                  options: "老师,学生",
+                  rows: JSON.stringify(
+                    _getRoleList.map(i => {
+                      return { content: i.content, role: i.role };
+                    })
+                  )
+                },
+                response_mode: "blocking",
+                user: _this.userId
+              };
+              _getRoleLoading = true;
+              const config = {
+                headers: {
+                  Authorization: `Bearer app-TonzLPv7rPG0EtnFKszOWjwt`,
+                  "Content-Type": "application/json"
+                }
+              };
+              // _this.ajax
+              //   .post("https://dify.cocorobo.cn/v1/workflows/run", params)
+              //   .then(res => {
+              //     let _runData = res.data;
+              //     let _runResult = _runData.outputs.result;
+              //     _runResult.forEach((txt, index) => {
+              //       let _oldRole = _getRoleList[index].role;
+              //       if (!_roleList[_oldRole]) {
+              //         _roleList[_oldRole] = txt;
+              //       }
+              //     });
+              //     // 去除内容
+              //     _getRoleList.splice(0, _runResult.length);
+              //     let _indexList = [];
+              //     _getRoleList.forEach((i, index) => {
+              //       if (_roleList[i.role]) {
+              //         textList[i.index].role = _roleList[i.role];
+              //         _indexList.push(index);
+              //       }
+              //     });
+              //     _getRoleList = _getRoleList.filter(
+              //       (item, index) => !_indexList.includes(index)
+              //     );
+              //     _getRoleLoading = false;
+              //   })
+              //   .catch(err => {
+              //     console.log("获取说话人编码失败", err);
+              //     _getRoleLoading = false;
+              //   });
+              fetch("https://dify.cocorobo.cn/v1/workflows/run", {
+                method: "POST",
+                body: JSON.stringify(params),
+                ...config
+              }).then(res => {
+                let _runResult = res.outputs.result;
                 _runResult.forEach((txt, index) => {
                   let _oldRole = _getRoleList[index].role;
                   if (!_roleList[_oldRole]) {
@@ -1742,13 +1778,9 @@ ${JSON.stringify(_list)}
                   (item, index) => !_indexList.includes(index)
                 );
                 _getRoleLoading = false;
-              })
-              .catch(err => {
-                console.log("获取说话人编码失败", err);
-                _getRoleLoading = false;
               });
             } catch (error) {
-              console.log("说话人编码失败",error)
+              console.log("说话人编码失败", error);
             }
           }
 

部分文件因文件數量過多而無法顯示