123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449 |
-
- Namespace.register("U.MD.D");
- U.MD.D.IsUseStudio = true;
- U.MD.D.LocalStorage = null;
- window.onload = function() {
- U.MD.D.Load();
- U.MD.U.L.login();
-
-
-
-
-
-
-
-
- }
- US.Config = {
- server: '//beta.api.cocorobo.cn/api/',
- api: '//beta.api.cocorobo.cn/',
- chat: "//chat.api.cocorobo.cn/",
- edu: '//api.edu.cocorobo.cn/edu/',
- origin: '//cocorobo.cn',
- pbl: "//pbl.cocorobo.cn/api/pbl/",
-
- basename: '',
- }
-
- U.MD.D.Load = U.MD.D.FLoad = function(cb) {
-
-
-
-
- if (U.MD.D.IsUseStudio) {
-
- U.selectEl("#UD_Dtop")[0].style.display = "block";
-
- new U.UF.UI.form(false, U.selectEl("#UD_Dtop")[0], { onresize: true, style: { "cssText": "width:100%;height:100%;padding:0;border:0;border-radius:0;box-shadow:0;position:static;" }, "className": "" }, { istop: false, isdrag: false, isdrag: false, isstretching: false, isenlarge: false, isnarrow: false, isclose: false }, null, { style: { "padding": "0" } });
- }
-
- if ($("#U_MD_Home")[0]) {
-
- U.MD.D.settingGlobalVariables();
-
- U.MD.D.addEvents();
-
-
-
-
-
-
- }
-
- U.MD.D.crossDomain(cb);
- }
- U.MD.D.settingGlobalVariables = function() {
-
- var _size = U.selectEl("body").getElementInfo();
- US.height = _size["CH"];
- US.width = _size["CW"];
-
- US.systemId = 1;
-
- US.pageId = Guid.newGuid();
- }
- U.MD.D.addEvents = function() {
-
- U.UF.EV.IsActivity(U.MD.D.focus, U.MD.D.blur);
-
- U.UF.F.clickTopWindow();
-
- U.MD.D.reSize();
- window.onresize = U.MD.D.reSize;
-
- if (U.MD.D.IsUseStudio) {
- if (window.print) {
- document.oncontextmenu = U.UF.EV.stopDefault;
- }
- document.onselectstart = U.UF.C.shieldedSelect;
- U.UF.EV.addElementEvent("keydown", document, U.UF.C.shieldedBackspace);
-
- }
-
- else {
- window.onerror = null;
- }
-
- U.UF.N.route(U.MD.N.urlGuide);
- }
- U.MD.D.reSize = function() {
-
-
-
-
- var _size = U.selectEl("html").getElementInfo();
- if (_size["CH"] > 500) {
-
- U.UF.UI.form.windowResize();
-
- US.height = _size["CH"];
- US.width = _size["CW"];
- document.body.style.width = US.width + 'px';
- document.body.style.height = US.height + 'px';
-
- if ($("#U_MD_D_RW")) {
- U.selectEl("#U_MD_D_RW").css("width", US.width - 165 + "px");
- U.MD.D.T.taskbar.multitask($("#U_MD_D_RW")[0]);
-
- U.MD.D.iconPostion($("#U_MD_D_K").Child());
- }
- }
- }
- U.MD.D.crossDomain = function(cb) {
- U.MD.D.loadApplication(cb);
-
-
-
-
-
-
-
-
-
-
-
-
- }
- U.MD.D.loadApplication = function(cb) {
-
-
-
- U.MD.D.asynCrossDomain(cb);
- }
- U.MD.D.asynCrossDomain = function(cb) {
-
-
-
-
-
-
-
-
-
-
-
-
-
- if ($("#UD_Dtop")[0]) {
- U.MD.D.I.init();
- }
-
- if (U.UF.C.isFunction(cb)) {
- cb();
- }
- setInterval(function() {
- U.MD.D.getuser();
- }, 2000)
- }
- U.MD.D.otherModularLoad = function() {
-
- U.MD.C.T.onesetInterval();
-
- U.MD.D.thirdPartyLoad();
-
-
- }
- U.MD.D.thirdPartyLoad = function() {
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- }
- U.MD.D.visitLog = function() {
- U.A.Request(US.USER, ["AddToLoginLog", US.userInfo.UserId || US.EMPTYGUID, US.city.userAllLocation || ""], function() {});
- }
- window.onunload = function() {
- try {
- var _userinfo = US.userInfo;
- if (U.MD.D.LocalStorage) {
- var _count = U.MD.D.LocalStorage.get("ati") || 0;
- if (_count > 0) { _count-- };
- U.MD.D.LocalStorage.set("ati", _count);
- }
- if (_userinfo.UserId && U.A) {
- U.A.Request(US.USER, ["UserOffline", _userinfo.UserId], function() {}, []);
- }
- } catch (e) {}
- }
- U.MD.D.error = function(errorMessage, scripturi, linenumber, columnnumber, errorobj) {
- errorobj = errorobj || {};
- U.A.Request(US.USER, ["SetError", 0, (event.errorMessage || event || errorMessage), (scripturi || event.filename || event.errorUr) + "。行号:" + (linenumber || event.lineno || event.errorLine)], function() {}, []);
- U.UF.C.console(event.errorMessage || event || errorobj);
- return true;
- }
- U.MD.D.getuser = function() {
- var userInfo = US.userInfo;
- if (Object.keys(userInfo).length === 0) {
- var _cookie = U.UF.Cookie.get("cocorobo");
- if (Object.keys(userInfo).length === 0 && _cookie) {
- U.A.Request(US.Config.server + "getcookieuserid", [], function(res) {
- if (res.value && res.value[0] && res.value[0][0]) {
- var _user = res.value[0][0];
- U.A.Request(US.Config.edu + "admin/userinfo/userinfoById/" + _user.userid, [], function(res) {
- if (res.value && res.value[0] && res.value[0][0]) {
- US.userInfo = res.value[0][0];
- US.userInfo.userid = _user.userid;
- if ($("#U_MD_HomeC_Pop")[0]) {
- $("#U_MD_HomeC_Pop")[0].close();
- }
- U.A.Request(US.Config.pbl + "selectUser?userid=" + _user.userid, [], function(res) {
- if (res.value == null || res.value[0].length == 0) {
-
- let _name = US.userInfo.alias ? US.userInfo.alias : US.userInfo.username
- let _type = US.userInfo == 1 ? 2 : 1
-
-
- U.A.Request(US.Config.pbl + "updatePblMessage", [_user.userid, _name, _type, '45facc0a-1211-11ec-80ad-005056b86db5', '', '', "0"], function(res) {
- window.location.reload();
- }, [], { "type": "POST", "withCredentials": true });
- } else {
- if (res.value[0][0].organizeid == '91305d49-01ba-11ed-8c78-005056b86db4') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/mingdeBg.png")'
- } else if (res.value[0][0].organizeid == 'c7df0bd4-6e75-401a-a137-4e163aa62263') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhongshanBg.png")'
- } else if (res.value[0][0].organizeid == '580aac24-a939-49f7-a75a-40a7b5af3a17') {
-
- } else if (res.value[0][0].organizeid == 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yunhaiBg.png")'
- } else if (res.value[0][0].organizeid == '857af1c7-c8ee-4b04-85b5-fd182903adb7') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/beijingBg.png")'
- } else if (res.value[0][0].organizeid == '69893dca-1d47-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/weilaiBg.png")'
- } else if (res.value[0][0].organizeid == 'efdef564-4064-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/pz.jpg")'
- } else if (res.value[0][0].organizeid == 'd9db3320-503a-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/hzBg.png")'
- } else if (res.value[0][0].organizeid == 'ccb9754d-59c1-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
- } else if (res.value[0][0].organizeid == 'f30a6615-5379-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaBg.png")'
- } else if (res.value[0][0].organizeid == '4787cc87-6588-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
- }
- if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yantianOrgBg.png")'
- } else if (res.value[0][0].org == '7ada499f-4ec7-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/csteamBg.png")'
- } else if (res.value[0][0].org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gm/bg.png")'
- }
- US.userInfo = res.value[0][0];
- $(".avatar")[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";
- U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
- U.MD.O.P.connect();
- }, [], { "type": "GET", "withCredentials": true });
- }
- }, [], { "type": "GET", "withCredentials": true });
- }
- }, [], { "type": "GET", "withCredentials": true });
- }
- } else {
- if (userInfo.organizeid == '91305d49-01ba-11ed-8c78-005056b86db4') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/mingdeBg.png")'
- } else if (userInfo.organizeid == 'c7df0bd4-6e75-401a-a137-4e163aa62263') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/zhongshanBg.png")'
- } else if (userInfo.organizeid == '580aac24-a939-49f7-a75a-40a7b5af3a17') {
-
- } else if (userInfo.organizeid == 'b1095a3c-1d06-4ac8-854f-7c0d97f4ab41') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yunhaiBg.png")'
- } else if (userInfo.organizeid == '857af1c7-c8ee-4b04-85b5-fd182903adb7') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/beijingBg.png")'
- } else if (userInfo.organizeid == '69893dca-1d47-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/weilaiBg.png")'
- } else if (userInfo.organizeid == 'efdef564-4064-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/pz.jpg")'
- } else if (userInfo.organizeid == 'd9db3320-503a-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/hzBg.png")'
- } else if (userInfo.organizeid == 'ccb9754d-59c1-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
- } else if (userInfo.organizeid == 'f30a6615-5379-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/longhuaBg.png")'
- } else if (userInfo.organizeid == '4787cc87-6588-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/nanfangBg.png")'
- }
- if (userInfo.org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f018d') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/yantianOrgBg.png")'
- } else if (userInfo.org == '7ada499f-4ec7-11ed-8c78-005056b86db5') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/csteamBg.png")'
- } else if (userInfo.org == 'eb2af5e9-ac3d-46b6-9fe3-3c1c364f0217') {
- $("#U_MD_D_BG")[0].style.backgroundImage = 'url("/img/icon/gm/bg.png")'
- }
- }
- }
- U.MD.D.fullscreen = function() {
-
- U.UF.C.fullScreen()
-
- document.body.addEventListener('dblclick', () => {
- U.UF.C.fullScreen()
-
-
-
-
-
-
- })
- }
|