U.U.I.js 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. Namespace.register("U.U.I"); //查看用户信息弹框
  2. //#region 用户信息查看
  3. //------------------------------------------------------------------------------用户个人信息
  4. //个人信息
  5. U.U.I.UIFZX = U.U.I.ViewOtherUserInfo = function (userid) {
  6. var _userinfoel = $("#UD_SYU").clone(true), // 用户信息元素
  7. _childs = $(_userinfoel[0]).Child(),
  8. _userinfoel = _childs[0], //用户个人资料元素
  9. _bloginfoel = _childs[1]; //用户博客资料元素
  10. //弹出好友信息弹框
  11. U.UI.Form({
  12. "min": false,
  13. "max": false,
  14. "id": "UD_SYU" + userid,
  15. "style": { width: "1024px", height: "80%" },
  16. "content": _userinfoel[0],
  17. "title": "<div class='UD_SYF_STI'>个人简历</div>",
  18. "hst": { style: { "padding": "0"} }
  19. });
  20. //信息加载
  21. U.A.Request(US.Auth, ["ViewOtherUserInfo", userid],
  22. U.U.I.ViewOtherUserInfoAsyn, [_userinfoel, _userinfoel, userid])
  23. U.U.I.ViewUserBlogInfo(_bloginfoel, userid, 1, true); //查看用户最新表表的博客
  24. }
  25. //打印用户信息 [[U.U.L.SYDLHD, [U.M.apply(this, )]]]
  26. U.U.I.ViewOtherUserInfoAsyn = function (r) {
  27. var i, j,
  28. context = r.context,
  29. UDOD = context[1],
  30. UIFD = context[2]
  31. _userinfoel, _UDSD, _UDND, _UDHD, _UDYD, _UIF = UIFD[0],
  32. UFG = UIFD[1][0],
  33. _UTP = UIFD[2],
  34. _UZS = UIFD[3],
  35. _UDE = { "FGC": ["正在追随"], "DTC": ["动静"], "DDC": ["云分享", [[U.D.DT.YYDK, ["Disk", { "userid": _UIF.UserId, "directoryid": US.FG}]]], "查看云分享"], "FDC": ["追随者"] },
  36. _childs = $(UDOD).Child(),
  37. _UDZD = $("div", _childs[3])[1],
  38. _UDPD = $("div", _childs[4]),
  39. _UDMD = $("div", _childs[5]),
  40. _UDWD = $("div", _childs[2]),
  41. _UDFD = $$("frag"),
  42. _UDID = $$("frag"),
  43. _UDBD = $$("frag"),
  44. _UDKD = $$("frag");
  45. if (US.Friend[1]) {
  46. _UGF = _$(US.Friend[1]).Select({ "UserId": _UIF.UserId }, null, 1)[0];
  47. }
  48. _TF = [{ "className": "UD_SYUIAO", "innerHTML": "追随(+)",
  49. "title": "点击添加", "onmouseover": null, "onmouseout": null
  50. },
  51. { "onclick": [[U.F.M.DeleteFriend, [_UGF || _UIF]]],
  52. "className": "UD_SYUIAO UD_SYUIAOO", "innerHTML": "已添加(+)",
  53. "title": "点击取消",
  54. "onmouseover": U.M.apply(_UDWD, [[_UDWD.addAttrArray, [{ "innerHTML": "取消追随(-)" }, 0]]]),
  55. "onmouseout": U.M.apply(_UDWD, [[_UDWD.addAttrArray, [{ "innerHTML": "已添加(+)" }, 0]]])
  56. }
  57. ]; //
  58. _childs[1].innerText = _UDZD.innerText = _UDMD[1].innerText = _UDPD[1].innerText = ""; _TF[0].onclick = [[U.F.M.AddFriend, [_UIF, U.M.apply(_UDWD, [[_UDWD.addAttrArray, [_TF[1], 0]]])]]]; _TF[1].onclick.push[_UDWD.addAttrArray, [_TF[0], 0]]; _TF[1].onclick = U.M.apply(_UDWD, _TF[1].onclick); //添加事件
  59. _UDWD.addAttrArray(_UGF ? _TF[1] : _TF[0], 0); _UDWD[1].onclick = U.M.apply(_UDWD[1], _UDE.DDC[1]); _UDWD[2].onclick = U.M.apply(_UDWD[2], [[U.U.L.SYDLHD, [U.M.apply(this, [[U.F.W.PopupFriendsForm, [_UIF]]])]]]);
  60. _userinfoel = $$("div", { "className": "UD_SYUINT" }, _UDFD);
  61. $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "onclick": [[U.M.StopBubble], [U.D.Img.Img, [_UIF, [{ "Thm": U.M.GetImgU(_UIF.UserThumbnailImageHead), "Img": U.M.GetImgU(_UIF.UserThumbnailImageHead)}]]]], "src": U.M.GetImgU(_UIF.UserThumbnailImageHead) }, _userinfoel);
  62. _UDSD = $$("div", { "className": "UD_SYUINN" }, _UDFD);
  63. _UDND = $$("div", { "className": "UD_SYUINNNO" }, _UDSD);
  64. $$("div", { "className": "UD_SYUINNN UTDF", "innerHTML": _UIF.UserNickName || _UIF.UserName }, _UDND);
  65. $$("div", { "className": "UD_SYUINNNT", "innerHTML": (_UIF.Province ? _UIF.Province.replace(/省|市/g, "") + _UIF.City : _UIF.LoginAddress || "") }, _UDND);
  66. $$("div", { "className": "UD_SYUINNQ UTDF", "innerHTML": _UIF.UserIndividualitysignature || "什么都没有留下" }, _UDSD);
  67. _UDND = $$("div", { "className": "UD_SYUINNT" }, _UDSD);
  68. for (i in _UDE) {
  69. _UDHD = $$("div", { "onclick": _UDE[i][1] || "", "title": _UDE[i][2] || "",
  70. "className": "UD_SYUINNTO UTDF", "style": (i == "FGC" ? { "marginLeft": "0px"} : {})
  71. }, _UDND); $$("div", { "className": "UD_SYUINNTOS", "innerHTML": UFG[i] }, _UDHD); $$("div", { "className": "UD_SYUINNTOX", "innerHTML": _UDE[i][0] }, _UDHD);
  72. }
  73. for (i = 0; i < _UZS.length; i++) {
  74. $$("img", { "onerror": U.M.ImgError, "title": "点击查看",
  75. "onclick": [[U.M.StopBubble], [U.U.I.ViewOtherUserInfo, [_UZS[i].UserId]]],
  76. "src": U.M.GetImgU(_UZS[i].UserThumbnailImageHead)
  77. }, _UDID);
  78. }
  79. _UDE = [_$(_UTP).Select({ "TF": 2 }), _$(_UTP).Select({ "TF": 1 }, null, 4)];
  80. for (i = 0; i < _UDE.length; i++) {
  81. if (_UDE[i].length) {
  82. for (j = 0; (j < _UDE[i].length && j < 4); j++) {
  83. if (i) {
  84. U.Ut.AddObj(_UDE[i][j], { "Thm": US.fs + _UDE[i][j]["UseFilesServerThumbnailName"], "Img": US.fs + _UDE[i][j]["UserFilesServerName"] });
  85. $$("img", { "onerror": [[U.M.ImgError, ["this", 1]]], "title": "点击查看原图", "onclick": [[U.M.StopBubble], [U.D.Img.Img, [_UIF, _UDE[i], j]]], "src": US.fs + _UDE[i][j]["UseFilesServerThumbnailName"] }, _UDBD);
  86. }
  87. else { _UDYD = $$("div", { "className": "UD_SYUIYCO", "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": _UIF.UserId, "directoryid": _UDE[i][j].UserDirectoryID}]]] }, _UDKD); $$("div", { "className": "UD_SYUIYCOI UD_SYI", "onclick": [[U.MPlayer.TYY, [_UDE[i][j]]]] }, _UDYD); $$("div", { "className": "UD_SYUIYCON", "innerHTML": _UDE[i][j]["UserFilesName"] }, _UDYD); }
  88. }
  89. }
  90. else {
  91. if (i) {
  92. _userinfoel = $$("div", { "className": "UD_SYSXZBELXCT UD_SYSXZBELXCTB" }, _UDBD);
  93. $$("div", { "className": "UD_SYSXZBELXCTS UD_SYI UD_SYSXZBELXCTSO" }, _userinfoel);
  94. _UDSD = $$("div", { "className": "UD_SYSXZBELXCTR" }, _userinfoel);
  95. $$("div", { "className": "UD_SYSXZBELXCTZ UD_SYSXZBELXCTZO", "innerHTML": "暂时没有图片,这里可以分享感兴趣的图片!!" }, _UDSD);
  96. $$("div", { "className": "UD_SYSXZBELXCTX UD_SYSXZBELXCTXO", "innerHTML": "点击我的图片", "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": US.userInfo.userid, "directoryid": US.PG}]]] }, _UDSD);
  97. }
  98. else {
  99. _userinfoel = $$("div", { "className": "UD_SYSXZBELXCT UD_SYSXZBELXCTA" }, _UDKD);
  100. $$("div", { "className": "UD_SYSXZBELXCTS UD_SYSXZBELCCTS UD_SYI UD_SYSXZBELXCTSO" }, _userinfoel);
  101. _UDSD = $$("div", { "className": "UD_SYUIYCC" }, _userinfoel);
  102. $$("div", { "className": "UD_SYSXZBELXCTZ UD_SYSXZBELXCTZT", "innerHTML": "当前还没有添加任何歌曲" }, _UDSD);
  103. _UDND = $$("div", { "className": "UD_SYSXZBELCCTX UD_SYSXZBELCCTXT" }, _UDSD);
  104. _UDHD = $$("div", { "className": "UD_SYSXZBELCCTXO UD_SYSXZBELCCTXOA", "innerHTML": "你可以 " }, _UDND);
  105. $$("span", { "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": US.userInfo.userid, "directoryid": US.MG}]]], "innerHTML": "我的音乐" }, _UDHD);
  106. _UDND = $$("div", { "className": "UD_SYSXZBELCCTX UD_SYSXZBELCCTXT" }, _UDSD);
  107. _UDHD = $$("div", { "className": "UD_SYSXZBELCCTXO UD_SYSXZBELCCTXOA", "innerHTML": "或者 " }, _UDND);
  108. $$("span", { "onclick": U.MPlayer.DKCSHYY, "innerHTML": "打开音乐播放器" }, _UDHD);
  109. }
  110. }
  111. }
  112. _UDE = [[_UDPD, US.PG], [_UDMD, US.MG]];
  113. for (i = 0; i < 2; i++) {
  114. _UDE[i][0].addAttrArray({ "onclick": [[U.D.DT.YYDK, ["Disk", { "userid": _UIF.UserId, "directoryid": _UDE[i][1]}]]] }, 0)
  115. }; //添加用户网盘查看事件
  116. _childs[1].appendChild(_UDFD);
  117. _UDZD.appendChild(_UDID);
  118. _UDPD[1].appendChild(_UDBD);
  119. _UDMD[1].appendChild(_UDKD); //生成显示
  120. }
  121. //滚动加载
  122. U.U.I.GDCKYHDT = function (UDOD, userid) {
  123. _UDFE = U.D.SY.ET["UIF"][userid][1];
  124. U.U.I.ViewUserBlogInfo(UDOD, _UDFE, userid, this.P + 2); //分页打印
  125. }
  126. //获取用户最新发表
  127. U.U.I.ViewUserBlogInfo = function (UDOD, UDPE, userid, P, TF) {
  128. var _userinfoel = $(UDOD).Child();
  129. UDPE = U.D.T.FYGBL(UDPE, P); //U.M.GTCN()
  130. if (UDPE[0]) {
  131. if (TF) { _userinfoel[1].innerText = ""; }
  132. if (UDPE[0].length) { U.D.Blog.PGBL(_userinfoel[1], UDPE[0], true); }
  133. else if (P === 1) { U.U.I.PCKYHDT(_userinfoel[1]); }
  134. } //打印文章
  135. else { U.A.Request(US.Auth, ["GFA", US.NU, (UDPE[1] - 1) * 100, UDPE[1] * 100, userid, US.NU], U.U.I.AsynCKYHDT, [(P == 1 ? [_userinfoel[1], true] : [$("#UD_SYUPL")[0], 1]), UDOD, userid, P, UDPE[1], _userinfoel]); }
  136. $("div#UD_SYUPC", _userinfoel[0])[0].onscroll = U.M.SSCH({ "AF": U.M.apply(null, [[U.U.I.GDCKYHDT, [_bloginfoel, userid]]]) }).SCH(); //滚动加载
  137. }
  138. //异步获取最新的文章
  139. U.U.I.AsynCKYHDT = function (r) {
  140. var context = r.context,
  141. UPXD = U.D.SY.ET["UIF"][context[2]];
  142. r = r.value;
  143. (!UPXD) && (UPXD = U.D.SY.ET["UIF"][context[2]] = [], UPXD[1] = []);
  144. UPXD[1] = UPXD[1] || [];
  145. UPXD[1][context[4]] = U.D.Blog.ZFSGBL(r);
  146. context[5][1].innerText = "";
  147. context[5][0].innerText = r[0] > 0 ? "动静..(" + r[0].SumNumber + ")" : "动静";
  148. U.U.I.ViewUserBlogInfo(context[1], UPXD[1], context[2], context[3]); //打印用户的文章
  149. }
  150. //用户资料没有发表文章
  151. U.U.I.PCKYHDT = function (UDOD) {
  152. var _userinfoel = $$("div", { "className": "UD_SYUT" }, UDOD);
  153. $$("div", { "className": "UD_SYUTS", "innerHTML": "他暂时没有相关的消息呢!!稍后再来试试吧~" }, _userinfoel);
  154. $$("div", { "className": "UD_SYUTX", "innerHTML": "Noting!!" }, _userinfoel);
  155. }
  156. //#endregion