lsc 3 miesięcy temu
rodzic
commit
80fab9bc58
1 zmienionych plików z 14 dodań i 1 usunięć
  1. 14 1
      js/Desktop/DeskTop.js

+ 14 - 1
js/Desktop/DeskTop.js

@@ -4817,9 +4817,22 @@ window.addEventListener('message', function (e) { // 监听 message 事件
             $('#classroom_observation_ob_comment iframe')[0].contentDocument.location.reload()
         }
         U.MD.D.I.openInApplication("classroom_observation_ob_comment", e.data.type)
+    }else if (e.data.tools && e.data.tools == "logout"){
+        U.MD.U.LO.logoutSystem()
+    }else if (e.data.tools && e.data.tools == "getLogin"){
+        let _iframe = $('#UI_Login')[0];
+        if (_iframe) {
+            var userInfo = US.userInfo;
+            var type = 2
+            if(userInfo && userInfo.userid){
+                type = 1
+            }
+            _contentWindow = _iframe.contentWindow;
+            _contentWindow.postMessage({ tools: "getLogin",type: type }, "*")
+        }
     }
     
-
+    
 });
 
 U.MD.D.I.selectUser = function () {