lsc 1 nedēļu atpakaļ
vecāks
revīzija
8d6a3ad9d3
1 mainītis faili ar 24 papildinājumiem un 0 dzēšanām
  1. 24 0
      js/Desktop/DeskTop.js

+ 24 - 0
js/Desktop/DeskTop.js

@@ -2848,6 +2848,12 @@ window.addEventListener('message', function(e) { // 监听 message 事件
             gid: e.data.gid || '',
         }
         U.MD.D.I.openInApplication("opencCscl", _data)
+    } else if (e.data.tools && e.data.tools == "opencCscl2") {
+        let _data = {
+            cid: e.data.cid || '',
+            gid: e.data.gid || '',
+        }
+        U.MD.D.I.openInApplication("opencCscl2", _data)
     }
 });
 
@@ -3051,6 +3057,24 @@ U.MD.D.I.openInApplication = function(str, data, screenType, tType) {
                 _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/futureClass.png)" }, "name": "CocoNote", "forms": _formdiv, "click": function() { U.MD.D.I.openApplication(str, obj, info); } }
                 break;
             }
+        case "opencCscl2":
+            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; fullscreen; geolocation; clipboard-read; clipboard-write; accelerometer; autoplay; gyroscope; payment; picture-in-picture; usb; xr-spatial-tracking;", "webkitallowfullscreen": "", "mozallowfullscreen": "", "allowfullscreen": "", "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://cscl.cocorobo.com?cid=" + data.cid + "&gid=" + data.gid }), {
+                    "id": "futureClass",
+                    "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
+                    "onresize": function () { }
+                }, {
+                    closecallback: function () { $("iframe", _formdiv)[0].contentWindow.loginout(); }
+                }, { "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) {