Browse Source

Merge branch 'beta' into HK

lsc 3 months ago
parent
commit
4371de53c3
2 changed files with 34 additions and 10 deletions
  1. 11 8
      js/Desktop/DeskTop.js
  2. 23 2
      uform.js

+ 11 - 8
js/Desktop/DeskTop.js

@@ -2182,7 +2182,7 @@ U.MD.D.I.initDesktopIcons = function (el, type) {
         )
         _easyDesktopIconInfo.push({ "Name": "AI共創", "Url": "AIChat", "style": { "cssText": "background-image:url(/img/icon/AIChat.png)", "width": '114px', 'height': '114px' } })
     }
-    if (_oid == '45facc0a-1211-11ec-80ad-005056b86db5' || _org == '0fec3a8a-ad04-11ed-b13d-005056b86db5') {
+    if (_oid == '45facc0a-1211-11ec-80ad-005056b86db5' || _org == '0fec3a8a-ad04-11ed-b13d-005056b86db5' || _org == '4d3812ef-fa66-11ef-b508-005056924926' || _oid == "0df61e4c-fe2d-11ef-b508-005056924926") {
         _teacherDesktopIconInfo.push(
             // { "Name": "chatPDF", "Url": "chatPDF", "style": { "cssText": "background-image:url(/img/icon/chatPDF.png)" } },
             { "Name": "學習分析", "Url": "learnAna", "style": { "cssText": "background-image:url(/img/icon/learnAna.png)" } },
@@ -7454,13 +7454,16 @@ U.MD.D.I.openApplication = function (str, obj, info) {
     if (_taskbar) {
         U.MD.D.T.taskbar(_taskbar); //創建任務處理
     }
-    // if(iframeBool){
-    //     U.UF.DL.loading($("iframe", _formdiv)[0].parentElement.parentElement)
-    //     let onloadListener = $("iframe", _formdiv)[0].onload = () => {
-    //         console.log("iframe進入");
-    //         U.UF.DL.uploading($("iframe", _formdiv)[0].parentElement.parentElement)
-    //     };
-    // }
+    if(iframeBool){
+        U.UF.DL.loading($("iframe", _formdiv)[0].parentElement.parentElement)
+        // let onloadListener = $("iframe", _formdiv)[0].onload = () => {
+        //     console.log("iframe进入");
+        //     U.UF.DL.uploading($("iframe", _formdiv)[0].parentElement.parentElement)
+        // };
+        setTimeout(() => {
+            U.UF.DL.uploading($("iframe", _formdiv)[0].parentElement.parentElement)
+        }, 2000);
+    }
 }
 
 

+ 23 - 2
uform.js

@@ -11589,8 +11589,29 @@ U.MD.U.L.login = U.MD.U.L.DLTC = function (fun) {
                     isstretching: false,
                     isenlarge: false,
                     isnarrow: false
-                }, { "style": { "height": "36px" }});
-        }else{
+                }, { "style": { "height": "36px" } });
+        }else if(window.origin.includes('gm.cocorobo.cn') || window.location.href.includes('gm.html')){
+            var _iframe = $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "id": "UI_Login", "name": "UI_Login", "frameborder": "no", "border": "0", "scrolling ": "no", "width": "360px", "height": "480px", "src": "https://edu.cocorobo.cn/course/userVerify?type=2" });
+            new U.UF.UI.form("", _iframe,
+                {
+                    "id": "U_MD_HomeC_Pop",
+                    "style": { "width": "500px", "height": "90%", "overflow": 'hidden' },
+                },
+                {
+                    isdrag: false,
+                    isstretching: false,
+                    isenlarge: false,
+                    isnarrow: false
+                });
+            //跨域回调设置
+            U.UF.DL.iframeLoad(_iframe, function () {
+                //登录有的其他回调,如,登陆后直接打开好友聊天等
+                if (U.UF.C.isFunction(fun)) {
+                    U.MD.U.L.loginCallBack = fun; //回调处理
+                }
+                _iframe.contentWindow.U.MD.U.L.loginCallBack = U.MD.U.L.defaultCallBack; //设置登录回调
+            });
+        } else {
             var _iframe = $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "id": "UI_Login", "name": "UI_Login", "frameborder": "no", "border": "0", "scrolling ": "no", "width": "360px", "height": "480px", "src": "https://edu.cocorobo.hk/LoginIframe?type=2" });
             new U.UF.UI.form("", _iframe,
                 {