DeskTop.js 49 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040
  1. /*
  2. 此处为桌面系统启动应用区域
  3. */
  4. Namespace.register("U.MD.D.I"); //桌面应用处理
  5. //判断图片是否在拖拽,如果是拖拽图标的过程是不会打开图片的
  6. U.MD.D.I.IsDrag;
  7. U.MD.D.I.Ip;
  8. //桌面图标的全局变量
  9. U.MD.D.I.DeskIcon = [
  10. //
  11. // { "Name": "互联办公", "Url": "boomYun", "Img": { "x": "-844", "y": "-419"} },
  12. // { "Name": "Word", "Url": "word", "Img": { "x": "-462", "y": "-296"} },
  13. // { "Name": "Execl", "Url": "excel", "Img": { "x": "-523", "y": "-296"} },
  14. // { "Name": "文本文件", "Url": "txt", "Img": { "x": "-267", "y": "-413"} },
  15. // { "Name": "我的好友", "Url": "friend", "Img": { "x": "-648", "y": "-297"} },
  16. // { "Name": "查找好友", "Url": "lookupFriend", "Img": { "x": "-85", "y": "-413"} },
  17. // { "Name": "我的设置", "Url": "set", "Img": { "x": "-400", "y": "-296"} },
  18. // { "Name": "系统设置", "Url": "systemSet", "Img": { "x": "-144", "y": "-413"} },
  19. // { "Name": "云端下载", "Url": "client", "Img": { "x": "-648", "y": "-357"} },
  20. // { "Name": "云端产品", "Url": "xz", "Img": { "x": "-24", "y": "-413"} }
  21. // { "Name": "FTP", "Url": "ftp", "Img": { "x": "-24", "y": "-413"} },
  22. // { "Name": "群文档", "Url": "group", "Img": { "x": "-85", "y": "-413"} },
  23. // { "Name": "web编程", "Url": "frontEndProgramming", "Img": { "x": "-275", "y": "-297"} },
  24. // { "Name": "后端编程", "Url": "backEndProgramming", "Img": { "x": "-275", "y": "-297"} },
  25. { "Name": "项目管理", "Url": "project", "style": { "cssText": "background-image:url(/img/icon/project.png)" } },
  26. { "Name": "学习中心", "Url": "study", "style": { "cssText": "background-image:url(/img/icon/study.png)" } },
  27. { "Name": "学生管理", "Url": "student", "style": { "cssText": "background-image:url(/img/icon/student.png)" } },
  28. { "Name": "评价管理", "Url": "evaluate", "style": { "cssText": "background-image:url(/img/icon/evaluation.png)" } },
  29. { "Name": "班级管理", "Url": "class", "style": { "cssText": "background-image:url(/img/icon/class.png)" } },
  30. { "Name": "我的资料", "Url": "my", "style": { "cssText": "background-image:url(/img/icon/myMessage.png)" } },
  31. { "Name": "通知公告", "Url": "notice", "style": { "cssText": "background-image:url(/img/icon/news.png)" } },
  32. { "Name": "素材库", "Url": "library", "style": { "cssText": "background-image:url(/img/icon/library.png)" } },
  33. { "Name": "电子白板", "Url": "whiteboard", "style": { "cssText": "background-image:url(/img/icon/whiteBoard.png)" } },
  34. { "Name": "问卷调查", "Url": "investigation", "style": { "cssText": "background-image:url(/img/icon/ask.png)" } },
  35. { "Name": "便签分类", "Url": "note", "style": { "cssText": "background-image:url(/img/icon/note.png)" } },
  36. { "Name": "量规评分", "Url": "score", "style": { "cssText": "background-image:url(/img/icon/score.png)" } },
  37. { "Name": "思维导图", "Url": "mind", "style": { "cssText": "background-image:url(/img/icon/mindMapping.png)" } },
  38. { "Name": "协同文档", "Url": "doc", "style": { "cssText": "background-image:url(/img/icon/doc.png)" } },
  39. { "Name": "思维网格", "Url": "mindNetwork", "style": { "cssText": "background-image:url(/img/icon/mindNetwork.png)" } }
  40. ];
  41. //#region 桌面初始化a
  42. /**
  43. * 初始化桌面的起始函数
  44. *
  45. */
  46. U.MD.D.I.init = function () {
  47. if ($("#U_MD_D_K")[0]) {
  48. //初始化桌面图标
  49. U.MD.D.I.initDesktopIcons($("#U_MD_D_K")[0]);
  50. // var clickUrl = ':12588/requestIp.php';
  51. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  52. // U.MD.D.I.Ip = data;
  53. // var AccessUrl = ':12588/useAccess.php?ip=' + U.MD.D.I.Ip;
  54. // U.MD.D.I.Mysqlrequest(AccessUrl,function(data){
  55. // U.selectEl("#U_MD_D_RW").css("width", US.width - 165 + "px");
  56. // })
  57. // //初始化任务栏,因为是静态的,所以直接改变样式即可.
  58. // })
  59. }
  60. }
  61. /**
  62. * 隐藏任务栏
  63. *
  64. * @param {element} 桌面元素
  65. */
  66. U.MD.D.I.hiddenTaskbar = function (el) {
  67. //任务栏位置变小
  68. U.selectEl(el).parentElement(3).css({ "bottom": "-60px" });
  69. //桌面的位置变大
  70. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  71. }
  72. /**
  73. * 隐藏任务栏
  74. *
  75. * @param {element} 桌面元素
  76. */
  77. U.MD.D.I.hiddenTaskbarout = function (el) {
  78. //任务栏位置变小
  79. if (!U.UF.EV.stopBubbleMouseOutOrOver(el)) {
  80. //任务栏位置变化
  81. U.selectEl(el).css({ "bottom": "-60px" });
  82. //桌面的位置变大
  83. // U.selectEl("#U_MD_D_K").css({ "left": "5px" });
  84. }
  85. }
  86. /**
  87. * 初始化打印桌面图标
  88. *
  89. * @param {element} 桌面元素
  90. */
  91. U.MD.D.I.initDesktopIcons = function (el) {
  92. var i, //用于循环
  93. _content, //桌面图标元素
  94. _iconcontent, //桌面图标元素
  95. _frag = $$("frag"), //定义一个碎片元素
  96. _DesktopIconInfo = U.MD.D.I.DeskIcon; //获取桌面图标
  97. //清楚桌面图标
  98. el.innerHTML = "";
  99. //循环创建桌面图标
  100. for (i = 0; i < _DesktopIconInfo.length; i++) {
  101. _content = $$("div", {
  102. className: "U_MD_D_KO",
  103. "onmousedown": U.UF.C.closure(function (obj) {
  104. //防止拖动图标即打开了桌面应用
  105. U.MD.D.click(this, obj);
  106. }, [_DesktopIconInfo[i]]),
  107. "onclick": U.UF.C.closure(function (obj) {
  108. //防止拖动图标即打开了桌面应用
  109. U.MD.D.click(this, obj);
  110. }, [_DesktopIconInfo[i]])
  111. }, _frag); //
  112. _iconcontent = $$("div", { className: "U_MD_D_KOA" }, _content);
  113. $$("div", { className: "U_MD_D_KOS U_Img", "style": _DesktopIconInfo[i].style }, _iconcontent); //{ "backgroundPosition": _DesktopIconInfo[i].Img.x + "px " + _DesktopIconInfo[i].Img.y + "px" }
  114. $$("div", { className: "U_MD_D_KOX", "style": { "cssText": "text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -webkit-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; -moz-text-shadow: rgb(100 100 100) 2px 1px 3px, rgb(102 102 102) 0px 1px 0px, rgb(85 85 85) -1px 0px 0px, rgb(153 153 153) 0px -1px 0px; filter: Glow(color=#777777, strength=1)\9;" }, "innerHTML": _DesktopIconInfo[i].Name }, _iconcontent);
  115. }
  116. //加载好后给图标定位
  117. U.MD.D.iconPostion($(_frag).Child());
  118. //把图标加载到页面
  119. el.appendChild(_frag);
  120. }
  121. /**
  122. * 显示任务栏
  123. *
  124. * @param {element} 桌面元素
  125. */
  126. U.MD.D.I.displayTaskbar = function (el) {
  127. //判断是否需要形式任务栏,由于用了mouseover事件会冒泡响应多次,这里做了过滤
  128. if (!U.UF.EV.stopBubbleMouseOutOrOver(el) && U.selectEl(el).css("bottom") != "0px") {
  129. //任务栏位置变化
  130. U.selectEl(el).css({ "bottom": "0px" });
  131. //桌面位置变话
  132. // U.selectEl("#U_MD_D_K").css({ "left": "70px" });
  133. }
  134. }
  135. //#region 桌面图标拖动逻辑
  136. /**
  137. * 桌面排列图标
  138. *
  139. * @param {element} 桌面元素
  140. * @param {object} 上下相距的距离
  141. * @param {object} 左右相距的距离
  142. * @return {object} 命名空间
  143. */
  144. U.MD.D.iconPostion = function (childs, top, left) {
  145. var i; //用于循环处理
  146. top = top || 15; //如果没有设置元素的间距处理默认上间距为15
  147. left = left || 20; //如果没有设置元素的间距处理默认左间距为15
  148. //循环所有的图标,设置每个图标的间距,打印顺序是竖排打印的方式
  149. for (i = 0; i < childs.length; i++) {
  150. //如果竖排top超过了范围处理
  151. if (top + 95 > US.height - 10) {
  152. //left超过了页面范围处理,则向上重叠打印处理
  153. if ((left + 180) > US.width) {
  154. top -= 115;
  155. left -= 90;
  156. }
  157. //没有超过范围,那么left+90添加到下一个竖排打印
  158. else {
  159. left += 90;
  160. top = 15;
  161. };
  162. }
  163. //给图标的位置赋值
  164. U.selectEl(childs[i]).css({ top: top + "px", left: left + "px" });
  165. if (i < childs.length - 1) {
  166. //页面图标每次向下加115
  167. top += 115;
  168. }
  169. }
  170. //返回最后调用的图标的位置
  171. return [top, left];
  172. }
  173. /**
  174. * 桌面点击事件逻辑
  175. *
  176. * @param {element} 桌面元素
  177. * @param {object} 上下相距的距离
  178. * @param {object} 左右相距的距离
  179. * @return {object} 命名空间
  180. */
  181. U.MD.D.click = function (el, obj) {
  182. var _buttonnumber = event.button; //点击的按钮的事件值
  183. U.UF.EV.stopBubble(); //阻止向上冒泡
  184. //onmousedown 包含了左键和右键 这里大于2是为了兼容 所有浏览器的右键处理
  185. if (_buttonnumber < 2) {
  186. //如果是click事件的处理
  187. if (event.type == "click") {
  188. //如果元素在mousemove事件中没有移动则出发click事件
  189. if (!U.MD.D.I.IsDrag) {
  190. //打开应用处理
  191. U.MD.D.I.openApplication(obj.Url, { "userid": US.user.userid, "directoryid": US.FTPFOLDERID });
  192. }
  193. }
  194. //如果是mouse事件的处理
  195. else {
  196. //拖动处理,添加拖动和拖动结束事件
  197. U.UF.F.drag(el, U.MD.D.iconMove, U.MD.D.iconUp);
  198. }
  199. U.MD.D.I.IsDrag = false;
  200. }
  201. }
  202. /**
  203. * 拖动的处理
  204. *
  205. */
  206. U.MD.D.iconMove = function () {
  207. //如果当前位置点击初始化的位置出现了变化,则设置是否拖动的属性 U.MD.D.I.IsDrag为true
  208. U.MD.D.I.IsDrag = true;
  209. }
  210. /**
  211. * 拖动结束后,这里是定位处理,以网状的形式定位
  212. *
  213. * @param {element} 拖动的元素
  214. * @return {object} 命名空间
  215. */
  216. U.MD.D.iconUp = function (el) {
  217. var _top = 15,
  218. _left = 20,
  219. _margin,
  220. _childs = U.selectEl("#U_MD_D_K").Child(), //桌面所有的图标
  221. _positioninfo = U.UF.EL.getElementInfo(el); //获取拖动结束的元素的位置
  222. if (_positioninfo["OT"] > 15) {
  223. //网状的形式定位,如果差超过了55,那么向下定位,否则向上定位
  224. _margin = ((_positioninfo["OT"] - 15) % 115 > 55 && _positioninfo["OT"] + 115 < US.height) ? 1 : 0;
  225. _top = (Math.floor((_positioninfo["OT"] - 15) / 115) + _margin) * 115 + 15;
  226. }
  227. if (_positioninfo["OL"] > 20) {
  228. //网状的形式定位,如果差超过了90,那么向右定位,否则向左定位
  229. _margin = ((_positioninfo["OL"] - 20) % 90 > 45 && _positioninfo["OL"] + 90 < US.width) ? 1 : 0;
  230. _left = (Math.floor((_positioninfo["OL"] - 20) / 90) + _margin) * 90 + 20
  231. }
  232. //while循环判断么一个重叠的元素
  233. do {
  234. _positioninfo = U.MD.D.iconPostion([el], _top, _left); //给重叠的元素向下定位
  235. _top = _positioninfo[0] + 115; //得到定位后的top
  236. _left = _positioninfo[1]; //得到定位后的left
  237. } while (el = U.MD.D.isOverlap(el, _childs, _positioninfo))
  238. }
  239. /**
  240. * 判断拖动后图标是否重叠
  241. *
  242. * @param {element} 拖动的元素
  243. * @param {element} 桌面所有的元素
  244. * @param {array} 拖动元素的位置
  245. ----------[0] 上 top
  246. ----------[1] 左 left
  247. * @return {object} 命名空间
  248. */
  249. U.MD.D.isOverlap = function (el, childs, postionarray) {
  250. //循环所有的图标
  251. for (var i = 0; i < childs.length; i++) {
  252. //判断有没有和该图标诶子重叠的元素
  253. if (el != childs[i] && (childs[i].offsetTop == postionarray[0] && childs[i].offsetLeft == postionarray[1])) {
  254. return childs[i]; //如果有返回
  255. }
  256. }
  257. }
  258. //#endregion
  259. //#endregion
  260. //#region 桌面应用
  261. /**
  262. * 打开应用
  263. *
  264. * @param {string} 类型
  265. -----------------Disk 网盘系统
  266. -----------------PDisk 学习系统网盘
  267. -----------------Poto 图片
  268. -----------------Video 视频
  269. -----------------Music 音乐
  270. -----------------Word word
  271. -----------------Excel excel
  272. -----------------Txt 记事本
  273. -----------------PB 学习系统
  274. -----------------Blog 朋友圈系统
  275. -----------------FTP ftp系统
  276. -----------------Group 好友群
  277. -----------------SY 首页系统
  278. -----------------Set 个人设置
  279. -----------------XSet 系统设置
  280. -----------------App 我们所有的app
  281. -----------------BC c.1473.cn 平台
  282. -----------------CWeb d.1473.cn 变成平台
  283. -----------------其他的外联系统 我们统一用iframe打开
  284. * @param {array} 类型
  285. 如果第一个参数为"disk",则第二个参数为object,里面包含了用户id和目录id{userid:"",directoryid:""}
  286. 如果第一个参数为"word"或者"excel","txt",则第二个参数为文件信息fileinfo。
  287. 如果第一个参数为"blog"或者"PDisk"。建议删除。
  288. 如果第一个参数为其他,则无第二个参数
  289. * @returns {array}
  290. */
  291. window.addEventListener('message', function (e) { // 监听 message 事件
  292. // alert(e.data.type);
  293. if (e.data.type && e.data.type == "1") { //项目管理传入
  294. U.MD.D.I.openInApplication("study", e.data.cid)
  295. } else if (e.data.close && e.data.close == "1") { //更新用户信息
  296. U.MD.D.I.selectUser();
  297. }
  298. });
  299. U.MD.D.I.isRoom = function () {
  300. U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + US.user.userid, [], function (res) { //US.user.userid
  301. if (res.value == null || res.value[0].length == 0) {
  302. U.MD.D.I.openRoomConfirm();
  303. } else {
  304. US.numNum = res.value[0][0].num;
  305. U.MD.D.I.isOpenRoomConfirm();
  306. }
  307. }, [], { "type": "GET", "withCredentials": true });
  308. }
  309. U.MD.D.I.MathRand = function () {
  310. var Num = "";
  311. for (var i = 0; i < 6; i++) {
  312. Num += Math.floor(Math.random() * 10);
  313. }
  314. return Num;
  315. }
  316. U.MD.D.I.checkNum = function () {
  317. var numNum = U.MD.D.I.MathRand();
  318. U.A.Request(US.Config.pbl + "checkRoomNumByFile?num=" + numNum, [], function (res) {
  319. if (res.value == null || res.value[0].length == 0) {
  320. U.MD.D.I.addRoom(numNum);
  321. } else {
  322. U.MD.D.I.checkNum();
  323. }
  324. }, [], { "type": "GET", "withCredentials": true });
  325. }
  326. U.MD.D.I.addRoom = function (numNum) {
  327. var data = decodeURIComponent(JSON.stringify([]));
  328. U.A.Request(US.Config.pbl + "insertRoomByFile?uid=" + US.user.userid + "&n=" + numNum + "&d=" + encodeURIComponent(data), [], function (res) {
  329. if (res.value == 1) {
  330. U.alert("创建成功");
  331. if ($("#add_room")[0]) {
  332. $("#add_room")[0].close(); //关闭登陆
  333. }
  334. U.MD.D.I.isRoom();
  335. } else {
  336. U.alert("创建失败");
  337. }
  338. }, [], { "type": "GET", "withCredentials": true });
  339. }
  340. U.MD.D.I.goRoom = function (number) {
  341. U.A.Request(US.Config.pbl + "selectRoomByFile?uid=" + number, [], function (res) { //US.user.userid
  342. if (res.value[0].length > 0) {
  343. U.alert("加入成功");
  344. if ($("#add_room")[0]) {
  345. $("#add_room")[0].close(); //关闭登陆
  346. }
  347. } else {
  348. U.alert("此房间不存在或已被解散");
  349. }
  350. }, [], { "type": "GET", "withCredentials": true });
  351. }
  352. U.MD.D.I.isOpenRoomConfirm = function () {
  353. var BOX = $$("div", {});
  354. var form_main = $$('div', { "className": "form-main" }, BOX);
  355. var form_content = $$('div', { "className": "form-content" }, form_main);
  356. var form_delete_main = $$('div', { "className": "form_delete-main-room" }, form_content);
  357. var form_delete_main_top = $$('div', { "className": "form_delete-main-top" }, form_delete_main);
  358. $$("div", { "className": "remark", "innerHTML": US.userinfo.username + "邀请您参与协同文档", }, form_delete_main_top)
  359. var form_delete_main_body = $$('div', { "className": "form_delete-main-body" }, form_delete_main);
  360. $$("div", {
  361. "class": "clickNav", "innerHTML": "点击链接加入房间",
  362. }, form_delete_main_body)
  363. $$("div", { "class": "link", "innerHTML": "http://cocorobo.wg.com/dm/EOGyBbFiCwam", }, form_delete_main_body)
  364. var room_number = $$('div', { "className": "room_number" }, form_delete_main_body);
  365. $$("div", { "class": "link", "innerHTML": "房间号:", }, room_number)
  366. $$("div", { "class": "roomNumber", "innerHTML": US.numNum, }, room_number)
  367. $$("div", { "className": "link", "innerHTML": "复制房间号信息,打开协同文档输入即可加入。", }, form_delete_main_body)
  368. var btnBox = $$('div', { "className": "copy-btn" }, form_main);
  369. var confirm = $$('button', { "className": "copy-message", "innerHTML": `${"一键复制信息"}` }, btnBox);
  370. new U.UF.UI.form(`${"邀请成员"}`, BOX, {
  371. id: 'invite_members',
  372. style: {
  373. "background": "#fffefe",
  374. "width": "350px",
  375. "height": "500px",
  376. "z-index": "99",
  377. }
  378. }, {
  379. isenlarge: false,
  380. isnarrow: false
  381. }, {
  382. style: {
  383. "height": "40px",
  384. "text-align": "center",
  385. "line-height": "40px",
  386. "text-indent": "25px",
  387. "background-repeat": "no-repeat",
  388. "font-size": "14px",
  389. "background-color": "#494949",
  390. "display": "flex",
  391. }
  392. });
  393. }
  394. U.MD.D.I.openRoomConfirm = function () {
  395. var BOX = $$("div", {});
  396. var form_main = $$('div', { "className": "form-main" }, BOX);
  397. var form_content = $$('div', { "className": "form-content" }, form_main);
  398. var form_delete_main = $$('div', { "className": "form_delete-main" }, form_content);
  399. $$("input", { "className": "form_delete-main_box", "placeholder": `${"请输入要加入的房间号"}` }, form_delete_main);
  400. $$("div", { "className": "remark", "innerHTML": "备注:输入房间号点击加入房间或点击创建房间直接创建房间", }, form_delete_main)
  401. var btnBox = $$('div', { "className": "form-btn" }, form_delete_main);
  402. var cencal = $$('button', { "className": "form-cencal", "innerHTML": `${"加入房间"}` }, btnBox);
  403. var confirm = $$('button', { "className": "form-confirm", "innerHTML": `${"创建房间"}` }, btnBox);
  404. new U.UF.UI.form(`${"创建/加入房间"}`, BOX, {
  405. id: 'add_room',
  406. style: {
  407. "background": "#fffefe",
  408. "width": "400px",
  409. "height": "281px",
  410. "z-index": "99",
  411. }
  412. }, {
  413. isenlarge: false,
  414. isnarrow: false
  415. }, {
  416. style: {
  417. "height": "40px",
  418. "text-align": "center",
  419. "line-height": "40px",
  420. "text-indent": "25px",
  421. "background-repeat": "no-repeat",
  422. "font-size": "16px",
  423. "background-color": "#32455B",
  424. "display": "flex",
  425. }
  426. });
  427. confirm.onclick = function () {
  428. U.MD.D.I.checkNum();
  429. }
  430. cencal.onclick = function () {
  431. U.MD.D.I.goRoom($(".form_delete-main_box")[0].value);
  432. }
  433. }
  434. U.MD.D.I.selectUser = function () {
  435. U.A.Request(US.Config.pbl + "selectUser?userid=" + US.user.userid, [], function (res) {//US.user.userid
  436. if (res.value[0].length > 0) {
  437. US.userinfo = res.value[0][0];
  438. $(".userName")[0].innerHTML = US.userinfo.username;
  439. }
  440. }, [], { "type": "GET", "withCredentials": true });
  441. }
  442. U.MD.D.I.openInApplication = function (str, data) {
  443. var _userid = US.user.userid, //登录用户id
  444. _oid = US.userinfo.organizeid;
  445. switch (str) {
  446. case "study":
  447. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  448. setTimeout(() => {
  449. U.MD.U.L.login();
  450. }, 2000);
  451. } else {
  452. _formdiv = new U.UF.UI.form(
  453. "项目详情",
  454. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/courseDetail?userid=" + _userid + "&oid=" + _oid + "&courseId=" + data }), {
  455. "id": "study",
  456. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  457. "onresize": function () { }
  458. }, {
  459. closecallback: function () { }
  460. }, { "style": { "height": "36px" } }).form; //创建窗体
  461. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  462. break;
  463. }
  464. }
  465. }
  466. U.MD.D.I.openApplication = function (str, obj, info) {
  467. obj = obj || {};
  468. var _taskbar, //_taskbar 作为任务栏显示的元素,包含图标和名字
  469. _formdiv, //创建任务栏时同时弹出的窗体元素。
  470. _userinfo = US.userinfo, //登录用户信息
  471. _userid = obj.userid || US.user.userid, //登录用户id
  472. _oid = obj.organizeid || _userinfo.organizeid;
  473. //选择应用处理
  474. switch (str) {
  475. case "project": //好友打开
  476. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  477. setTimeout(() => {
  478. U.MD.U.L.login();
  479. }, 2000);
  480. } else {
  481. _formdiv = new U.UF.UI.form(
  482. "项目管理",
  483. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/course?userid=" + _userid + "&oid=" + _oid }), {
  484. "id": "project",
  485. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  486. "onresize": function () { }
  487. }, {
  488. closecallback: function () { }
  489. }, { "style": { "height": "36px" } }).form; //创建窗体
  490. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  491. break;
  492. }
  493. case "student":
  494. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  495. setTimeout(() => {
  496. U.MD.U.L.login();
  497. }, 2000);
  498. } else {
  499. _formdiv = new U.UF.UI.form(
  500. "学生管理",
  501. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/student?userid=" + _userid + "&oid=" + _oid }), {
  502. "id": "student",
  503. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  504. "onresize": function () { }
  505. }, {
  506. closecallback: function () { }
  507. }, { "style": { "height": "36px" } }).form; //创建窗体
  508. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/student.png)" }, "name": "学生管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  509. break;
  510. }
  511. case "evaluate":
  512. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  513. setTimeout(() => {
  514. U.MD.U.L.login();
  515. }, 2000);
  516. } else {
  517. _formdiv = new U.UF.UI.form(
  518. "评价管理",
  519. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/works?userid=" + _userid + "&oid=" + _oid }), {
  520. "id": "evaluate",
  521. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  522. "onresize": function () { }
  523. }, {
  524. closecallback: function () { }
  525. }, { "style": { "height": "36px" } }).form; //创建窗体
  526. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/evaluation.png)" }, "name": "评价管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  527. break;
  528. }
  529. case "class":
  530. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  531. setTimeout(() => {
  532. U.MD.U.L.login();
  533. }, 2000);
  534. } else {
  535. _formdiv = new U.UF.UI.form(
  536. "班级管理",
  537. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/class?userid=" + _userid + "&oid=" + _oid }), {
  538. "id": "class",
  539. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  540. "onresize": function () { }
  541. }, {
  542. closecallback: function () { }
  543. }, { "style": { "height": "36px" } }).form; //创建窗体
  544. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/class.png)" }, "name": "班级管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  545. break;
  546. }
  547. case "my":
  548. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  549. setTimeout(() => {
  550. U.MD.U.L.login();
  551. }, 2000);
  552. } else {
  553. _formdiv = new U.UF.UI.form(
  554. "我的资料",
  555. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/data?userid=" + _userid }), {
  556. "id": "my",
  557. "style": { "width": "42%", "height": "90%", "overflow": 'hidden' },
  558. "onresize": function () { }
  559. }, {
  560. closecallback: function () { }
  561. }, { "style": { "height": "36px" } }).form; //创建窗体
  562. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/myMessage.png)" }, "name": "我的资料", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  563. break;
  564. }
  565. case "notice":
  566. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  567. setTimeout(() => {
  568. U.MD.U.L.login();
  569. }, 2000);
  570. } else {
  571. _formdiv = new U.UF.UI.form(
  572. "通知公告",
  573. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/notice?userid=" + _userid }), {
  574. "id": "notice",
  575. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  576. "onresize": function () { }
  577. }, {
  578. closecallback: function () { }
  579. }, { "style": { "height": "36px" } }).form; //创建窗体
  580. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/news.png)" }, "name": "通知公告", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  581. break;
  582. }
  583. case "library":
  584. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  585. setTimeout(() => {
  586. U.MD.U.L.login();
  587. }, 2000);
  588. } else {
  589. _formdiv = new U.UF.UI.form(
  590. "素材库",
  591. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/library?userid=" + _userid }), {
  592. "id": "library",
  593. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  594. "onresize": function () { }
  595. }, {
  596. closecallback: function () { }
  597. }, { "style": { "height": "36px" } }).form; //创建窗体
  598. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/library.png)" }, "name": "素材库", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  599. break;
  600. }
  601. case "whiteboard":
  602. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  603. setTimeout(() => {
  604. U.MD.U.L.login();
  605. }, 2000);
  606. } else {
  607. _formdiv = new U.UF.UI.form(
  608. "电子白板",
  609. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  610. "id": "whiteboard",
  611. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  612. "onresize": function () { }
  613. }, {
  614. closecallback: function () { }
  615. }, { "style": { "height": "36px" } }).form; //创建窗体
  616. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/whiteBoard.png)" }, "name": "电子白板", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  617. break;
  618. }
  619. case "investigation":
  620. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  621. setTimeout(() => {
  622. U.MD.U.L.login();
  623. }, 2000);
  624. } else {
  625. _formdiv = new U.UF.UI.form(
  626. "问卷调查",
  627. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/ask?userid=" + _userid }), {
  628. "id": "investigation",
  629. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  630. "onresize": function () { }
  631. }, {
  632. closecallback: function () { }
  633. }, { "style": { "height": "36px" } }).form; //创建窗体
  634. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/ask.png)" }, "name": "问卷调查", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  635. break;
  636. }
  637. case "note":
  638. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  639. setTimeout(() => {
  640. U.MD.U.L.login();
  641. }, 2000);
  642. } else {
  643. _formdiv = new U.UF.UI.form(
  644. "便签分类",
  645. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/note?userid=" + _userid }), {
  646. "id": "note",
  647. "style": { "width": "20%", "height": "90%", "overflow": 'hidden' },
  648. "onresize": function () { }
  649. }, {
  650. closecallback: function () { }
  651. }, { "style": { "height": "36px" } }).form; //创建窗体
  652. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/note.png)" }, "name": "便签分类", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  653. break;
  654. }
  655. case "score":
  656. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  657. setTimeout(() => {
  658. U.MD.U.L.login();
  659. }, 2000);
  660. } else {
  661. _formdiv = new U.UF.UI.form(
  662. "量规评分",
  663. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn" }), {
  664. "id": "score",
  665. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  666. "onresize": function () { }
  667. }, {
  668. closecallback: function () { }
  669. }, { "style": { "height": "36px" } }).form; //创建窗体
  670. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/score.png)" }, "name": "量规评分", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  671. break;
  672. }
  673. case "mind":
  674. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  675. setTimeout(() => {
  676. U.MD.U.L.login();
  677. }, 2000);
  678. } else {
  679. _formdiv = new U.UF.UI.form(
  680. "思维导图",
  681. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/jsmind/example/demo.html" }), {
  682. "id": "mind",
  683. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  684. "onresize": function () { }
  685. }, {
  686. closecallback: function () { }
  687. }, { "style": { "height": "36px" } }).form; //创建窗体
  688. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/mindMapping.png)" }, "name": "思维导图", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  689. break;
  690. }
  691. case "doc":
  692. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  693. setTimeout(() => {
  694. U.MD.U.L.login();
  695. }, 2000);
  696. } else {
  697. U.MD.D.I.isRoom();
  698. _formdiv = new U.UF.UI.form(
  699. "协同文档",
  700. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "/Office/Word/WordEditArea.htm" }), {
  701. "id": "doc",
  702. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  703. "onresize": function () { }
  704. }, {
  705. closecallback: function () { }
  706. }, { "style": { "height": "36px" } }).form; //创建窗体
  707. U.UF.DL.iframeLoad($("iframe", _formdiv)[0], function () {
  708. $("iframe", _formdiv)[0].contentWindow.U.MD.O.W.load();
  709. })
  710. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/doc.png)" }, "name": "协同文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  711. break;
  712. }
  713. case "study":
  714. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  715. setTimeout(() => {
  716. U.MD.U.L.login();
  717. }, 2000);
  718. } else {
  719. _formdiv = new U.UF.UI.form(
  720. "学习中心",
  721. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0;width:100%;height:100%" }, "src": "https://pbl.cocorobo.cn/pbl-student-table/dist/#/index?userid=" + _userid + "&oid=" + _oid }), { //https://pbl.cocorobo.cn/pbl-student-table/dist/#/index
  722. "id": "study",
  723. "style": { "width": "70%", "height": "90%", "overflow": 'hidden' },
  724. "onresize": function () { }
  725. }, {
  726. closecallback: function () { }
  727. }, { "style": { "height": "36px" } }).form; //创建窗体
  728. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/study.png)" }, "name": "学习中心", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  729. break;
  730. }
  731. case "mindNetwork": //好友打开
  732. if (!_userinfo || Object.keys(_userinfo).length === 0) {
  733. setTimeout(() => {
  734. U.MD.U.L.login();
  735. }, 2000);
  736. } else {
  737. _formdiv = new U.UF.UI.form(
  738. "思维网络",
  739. $$("iframe", { "frameborder": "no", "border": "0", "scrolling ": "no", "style": { "cssText": "border:0; width:100%; height:100%;" }, "src": "https://pbl.cocorobo.cn/pbl-teacher-table/dist/#/Grid?userid=" + _userid }), {
  740. "id": "mindNetwork",
  741. "style": { "width": "90%", "height": "90%", "overflow": 'hidden' },
  742. "onresize": function () { }
  743. }, {
  744. closecallback: function () { }
  745. }, { "style": { "height": "36px" } }).form; //创建窗体
  746. _taskbar = { "id": str + _formdiv.id, "style": { "backgroundImage": "url(/img/icon/project.png)" }, "name": "项目管理", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  747. break;
  748. }
  749. // case "friend": //好友打开
  750. // U.MD.D.I.IsDrag = true;
  751. // U.MD.F.W.viewFriend(info); //打开好友
  752. // // U.MD.N.urlWrite("friend/" + obj.directoryid, "好友"); //好友的url重写
  753. // break;
  754. // case "domain":
  755. // var _iframe = $$('iframe', { src: '//domain.1473.cn/DomainSystem.aspx/?fileId=' + info.fileId + '&type=' + info.type + '&mode=' + info.mode, frameborder: "0", style: { cssText: "width:100%;height:100%;border:0px" } });
  756. // _formdiv = new U.UF.UI.form("域名管理", _iframe, { id: "U_MD_DS_DomainShare", style: { "width": "370px", "height": "390px" } }).form;
  757. // if (_formdiv) {
  758. // //生成任务栏的变量
  759. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj, info); } }
  760. // }
  761. // break;
  762. // case "disk": //个人网盘查看
  763. // _formdiv = U.MD.DK.initDisk(_userid, obj.directoryid); //根据网盘数据,并加载网盘,里面包含了url重写
  764. // if (_formdiv) {
  765. // //生成任务栏的变量
  766. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-15px -296px", "name": "网盘", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  767. // }
  768. // break;
  769. // case "word": //Word打开
  770. // var _wordinfo = U.MD.O.word(_userinfo, obj, arguments[2]); //初始化word的处理
  771. // _formdiv = _wordinfo[0];
  772. // if (_formdiv) {
  773. // //生成任务栏的变量
  774. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-462px -296px", "name": "文档", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, _wordinfo[1]); } }
  775. // }
  776. // if (obj.UrlType != 'join') {
  777. // U.MD.N.urlWrite("word/" + _formdiv.id.substr(-36), "在线文档"); //word的url重写
  778. // }
  779. // break;
  780. // case "excel": //Excel打开
  781. // _formdiv = U.MD.O.excel(_userinfo, obj);
  782. // if (_formdiv) {
  783. // //生成任务栏的变量
  784. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-523px -296px", "name": "Excel", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  785. // }
  786. // U.MD.N.urlWrite("excel/" + _formdiv.id.substr(-36), "Excel");
  787. // break;
  788. // case "txt": //Txt打开
  789. // _formdiv = U.MD.D.Txt.textCreate();
  790. // if (_formdiv) {
  791. // //生成任务栏的变量
  792. // _taskbar = { "id": str + obj.directoryid, "backgroundPostion": "-267px -413px", "name": "文本", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  793. // }
  794. // U.MD.N.urlWrite("txt/" + _formdiv.id.substr(-36), "文本");
  795. // break;
  796. // case "lookupFriend":
  797. // _formdiv = U.MD.F.S.popSearchFriendsOrGroupForm(0);
  798. // //生成任务栏的变量
  799. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "查找好友", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  800. // U.MD.N.urlWrite("lookupfriend/" + obj.directoryid.substr(-36), "查找好友"); //查找好友的url重写
  801. // break;
  802. // case "ftp": //Ftp
  803. // _formdiv = U.MD.F.S.popupsSearchFtp();
  804. // //生成任务栏的变量
  805. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-144px -413px", "name": "FTP", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  806. // break;
  807. // case "group": //群组
  808. // _formdiv = U.MD.F.S.popupsSearchGroups(0);
  809. // //生成任务栏的变量
  810. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-85px -413px", "name": "群组", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  811. // break;
  812. // case "set": //个人设置
  813. // _formdiv = U.MD.U.P.userDataSet();
  814. // if (_formdiv) {
  815. // //生成任务栏的变量
  816. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "个人设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  817. // }
  818. // break;
  819. // case "systemSet": //系统设置
  820. // _formdiv = U.MD.D.B.init();
  821. // //生成任务栏的变量
  822. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-400px -296px", "name": "系统设置", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  823. // break;
  824. // case "boomYun": //BoomYun
  825. // _formdiv = U.Boom.I.onload();
  826. // //生成任务栏的变量
  827. // _taskbar = { "id": str + _formdiv.id, "backgroundPostion": "-844px -419px", "name": "互联办公", "forms": _formdiv, "click": function () { U.MD.D.I.openApplication(str, obj); } }
  828. // U.MD.N.urlWrite("boomyun", "互联办公"); //boomyun的url重写
  829. // break;
  830. // case "xz": //App下载
  831. // window.open("http://xz.1473.cn");
  832. // break;
  833. // case "client": //App下载
  834. // window.open("http://client.1473.cn");
  835. // break;
  836. // case "backEndProgramming": //在线编程平台打开
  837. // window.open("http://c.1473.cn");
  838. // break;
  839. // case "frontEndProgramming": //在线web编程
  840. // window.open("http://d.1473.cn");
  841. // break;
  842. // default:
  843. // break;
  844. }
  845. //U.MD.D.I.openClick(str);
  846. //如果有任务栏信息
  847. if (_taskbar) {
  848. U.MD.D.T.taskbar(_taskbar); //创建任务处理
  849. }
  850. }
  851. // U.MD.D.I.openClick = function(str){
  852. // var click = '';
  853. // switch(str){
  854. // case 'friend':
  855. // click = '我的好友';
  856. // break;
  857. // case 'domain':
  858. // click = '域名管理';
  859. // break;
  860. // case 'disk':
  861. // click = '我的云盘';
  862. // break;
  863. // case 'word':
  864. // click = 'Word';
  865. // break;
  866. // case 'excel':
  867. // click = 'Execl';
  868. // break;
  869. // case 'txt':
  870. // click = '文本文件';
  871. // break;
  872. // case 'lookupFriend':
  873. // click = '查找好友';
  874. // break;
  875. // case 'ftp':
  876. // click = 'FTP';
  877. // break;
  878. // case 'group':
  879. // click = '群组';
  880. // break;
  881. // case 'set':
  882. // click = '我的设置';
  883. // break;
  884. // case 'systemSet':
  885. // click = '系统设置';
  886. // break;
  887. // case 'boomYun':
  888. // click = '互联办公';
  889. // break;
  890. // case 'xz':
  891. // click = '云端下载';
  892. // break;
  893. // case 'client':
  894. // click = '有思浏览器';
  895. // break;
  896. // case 'backEndProgramming':
  897. // click = '在线后台编程';
  898. // break;
  899. // case 'frontEndProgramming':
  900. // click = '在线前端编程';
  901. // break;
  902. // default: break;
  903. // }
  904. // if(U.MD.D.I.Ip && click){
  905. // var clickUrl = ':12588/useClick.php?name=' + click + '&ip=' + U.MD.D.I.Ip;
  906. // U.MD.D.I.Mysqlrequest(clickUrl,function(data){
  907. // })
  908. // }
  909. // }
  910. /**
  911. *函数作用:ajax简易函数,使用post格式
  912. *@param url {data} 后台地址
  913. *@param data {data} 参数json
  914. *@param fn {data} 回调函数
  915. *
  916. */
  917. // U.MD.D.I.Mysqlrequest = function(url,fn){
  918. // var xhr = new XMLHttpRequest();
  919. // xhr.open("GET",url,true);
  920. // xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  921. // xhr.onreadystatechange = function(){
  922. // if(xhr.readyState == 4 && (xhr.status == 200 || xhr.status == 304)){
  923. // fn.call(this,xhr.responseText);
  924. // }
  925. // };
  926. // xhr.send();
  927. // }
  928. /*判断是否是内网IP*/
  929. // U.MD.D.I.isInnerIPFn = function(str){
  930. // var curPageUrl = str;
  931. // var reg1 = /(http|ftp|https|www):\/\//g;//去掉前缀
  932. // curPageUrl =curPageUrl.replace(reg1,'');
  933. // // console.log('curPageUrl-1 '+curPageUrl);
  934. // var reg2 = /\:+/g;//替换冒号为一点
  935. // curPageUrl =curPageUrl.replace(reg2,'.');
  936. // // console.log('curPageUrl-2 '+curPageUrl);
  937. // curPageUrl = curPageUrl.split('.');//通过一点来划分数组
  938. // var ipAddress = curPageUrl[0]+'.'+curPageUrl[1]+'.'+curPageUrl[2]+'.'+curPageUrl[3];
  939. // if(curPageUrl[2] != '16'){
  940. // return ipAddress;
  941. // }else{
  942. // return false;
  943. // }
  944. // }
  945. // U.MD.D.I.getUserIP = function(onNewIP) { // onNewIp - your listener function for new IPs
  946. // //compatibility for firefox and chrome
  947. // var myPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
  948. // var pc = new myPeerConnection({
  949. // iceServers: []
  950. // }),
  951. // noop = function() {},
  952. // localIPs = {},
  953. // ipRegex = /([0-9]{1,3}(\.[0-9]{1,3}){3}|[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7})/g,
  954. // key;
  955. // function iterateIP(ip) {
  956. // if (!localIPs[ip]) onNewIP(ip);
  957. // localIPs[ip] = true;
  958. // }
  959. // //create a bogus data channel
  960. // pc.createDataChannel("");
  961. // // create offer and set local description
  962. // pc.createOffer().then(function(sdp) {
  963. // sdp.sdp.split('\n').forEach(function(line) {
  964. // if (line.indexOf('candidate') < 0) return;
  965. // line.match(ipRegex).forEach(iterateIP);
  966. // });
  967. // pc.setLocalDescription(sdp, noop, noop);
  968. // }).catch(function(reason) {
  969. // // An error occurred, so handle the failure to connect
  970. // });
  971. // //sten for candidate events
  972. // pc.onicecandidate = function(ice) {
  973. // if (!ice || !ice.candidate || !ice.candidate.candidate || !ice.candidate.candidate.match(ipRegex)) return;
  974. // ice.candidate.candidate.match(ipRegex).forEach(iterateIP);
  975. // };
  976. // }
  977. // U.MD.D.I.getUserIpBool = function(callback){
  978. // U.MD.D.I.getUserIP(function(ip){
  979. // alert("Got IP! :" + ip);
  980. // });
  981. //}
  982. //#endregion