lsc 1 year ago
parent
commit
917b4c6f17
1 changed files with 24 additions and 3 deletions
  1. 24 3
      js/Desktop/DeskTop.js

+ 24 - 3
js/Desktop/DeskTop.js

@@ -2474,8 +2474,12 @@ window.addEventListener('message', function(e) { // 监听 message 事件
             classid:e.data.classid || '',
         }
         U.MD.D.I.openInApplication("dataClass", _data)
+    } else if (e.data.tools && e.data.tools == "opencCscl") {
+        let _data = {
+            classid:e.data.cid || '',
+        }
+        U.MD.D.I.openInApplication("opencCscl", _data)
     }
-
 });
 
 U.MD.D.I.selectUser = function() {
@@ -2642,7 +2646,7 @@ U.MD.D.I.openInApplication = function(str, data, screenType, tType) {
                     _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/studentCourse.png)" }, "name": "课程中心", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
                     break;
                 }
-            case "dataClass":
+        case "dataClass":
                     if (!_userinfo || Object.keys(_userinfo).length === 0) {
                         setTimeout(() => {
                             U.MD.U.L.login();
@@ -2660,8 +2664,25 @@ U.MD.D.I.openInApplication = function(str, data, screenType, tType) {
                         _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "数据报告", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
                         break;
                     }
+        case "opencCscl":
+                        if (!_userinfo || Object.keys(_userinfo).length === 0) {
+                            setTimeout(() => {
+                                U.MD.U.L.login();
+                            }, 2000);
+                        } else {
+                            _formdiv = new U.UF.UI.form(
+                                "协同建构",
+                                $$("iframe", { "allow": "camera *; microphone *;display-capture;midi;encrypted-media;", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://cscl.cocorobo.cn?cid="+  data.cid }), {
+                                    "id": "opencCscl",
+                                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                                    "onresize": function() {}
+                                }, {
+                                    closecallback: function() {}
+                                }, { "style": { "height": "36px" } }).form; //创建窗体
+                            _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/futureClass.png)" }, "name": "协同建构", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
+                            break;
+                        }
     }
-
 }
 U.MD.D.I.openApplication = function(str, obj, info) {
     obj = obj || {};