lsc 2 天之前
父節點
當前提交
b77ee6d97c
共有 1 個文件被更改,包括 29 次插入0 次删除
  1. 29 0
      js/Desktop/Onload.js

+ 29 - 0
js/Desktop/Onload.js

@@ -599,6 +599,35 @@ U.MD.D.getuser2 = function (userid, cid) {
             $("#U_MD_HomeC_Pop")[0].close(); //关闭登陆
         }
         loginPan(res.value[0][0], userid)
+
+        US.userInfo = res.value[0][0];
+        $(".avatar")[0].style.display = "block";
+        if (res.value[0][0].type === 1 && $(".U_PBL_Check")[0] && res.value[0][0].org != '150e3120-9195-11ed-b13d-005056b86db5') {
+            $(".U_PBL_Check")[0].style.display = "block";
+        }
+        $(".login")[0].style.display = "none";
+        $(".register")[0].style.display = "none";
+        $(".userName")[0].style.display = "block";
+        $(".userName")[0].innerHTML = US.userInfo.username || US.userInfo.alias;
+        $(".exit")[0].style.display = "block";
+        let _vipbox = $('.U_MD_D_BD_vip_box')[0]
+        _vipbox && (_vipbox.style.right = $(".U_MD_D_BD")[0].offsetWidth + 20 + 'px')
+        if(res.value[0][0].type === 1 && res.value[0][0].org == 'c95e0a56-c205-11ed-8d51-005056b86db5'){
+            U.MD.D.I.ModeCheck(2)
+        }else{
+            U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0], 1);
+        }
+        if(res.value[0][0].type === 1 && window.location.hash.indexOf('project') != -1){
+            U.MD.D.I.openApplication("project")
+        }
+        if(res.value[0][0].type === 1 && window.location.hash.indexOf('study') != -1){
+            U.MD.D.I.openApplication("study")
+        }
+        if(res.value[0][0].type === 2 && window.location.hash.indexOf('study') != -1){
+            U.MD.D.I.openApplication("studentStudy")
+        }
+        U.MD.O.P.connect(); //登录成功后连接socket服务同步协同编辑
+        U.MD.D.I.openInApplication("studyDetail", cid, 2, 2)
         U.MD.D.I.openInApplication("studyDetail", cid, 2, 2)
     }, [], { "type": "GET", "withCredentials": true });
 }