U.D.Blog.N.js 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. Namespace.register("U.MD.D.Blog.N"); //消息信息朋友圈
  2. //#region 登录pbblog消息查看区域
  3. //消息察看区域
  4. U.MD.D.Blog.N.PNXX = function () {
  5. var _UEL, _UBE, _UPE, _UKE, _UDAD, _UDMD, _UDE = US.forum.news[0], _UDOD = $("#UD_TBCMOF");
  6. if (_UDOD[0]) {
  7. _UDAD = _UDOD.Child(); _UDMD = $(_UDAD[2]).Child()[1];
  8. if ((_UEL = _UDAD[1].innerHTML = _UDE.length)) { //判断是否有消息通知
  9. U.MD.D.Blog.N.PNWB(_UDE); _UBE = _$(_UDE).Select({ "NF": null }); _UPE = _$(_UDE).Select({ "NF": US.FORUMROOTID }); _UKE = _$(_UDE).Select({ "NF": US.EMPTYGUID }); //朋友圈消息 pb消息 申请消息
  10. if (_UBE.length) { U.MD.D.Blog.N.PNSXX(_UBE, _UDMD); } if (_UPE.length || _UKE.length) { U.MD.D.Blog.N.BNXX(_UPE, _UDMD); U.MD.D.Blog.N.SQBNXX(_UKE, _UDAD[1]); }
  11. }
  12. _UDAD[2].style.display = _UEL ? "block" : "none";
  13. }
  14. }
  15. //查看详细消息
  16. U.MD.D.Blog.N.PNXXD = function () {
  17. }
  18. //发送消息在客户端
  19. U.MD.D.Blog.N.PNWB = function (UDE) {
  20. var i, _UET, _UCE = [];
  21. for (i = 0; i < UDE.length; i++) { _UCE.push({ "UsParamet": [UDE[i].NF, UDE[i].ArticleID, UDE[i].ReplyID], "UsImag": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead), "UsName": UDE[i].UserName, "UsType": "UPBR", "UsSYScontent": UDE[i].ReplyContent }); }
  22. if ((_UET = window.external)) { try { window.external.news(U.UF.S.jsonToStr(_UCE)); } catch (e) { } }
  23. }
  24. //查看PB数据
  25. U.MD.D.Blog.N.BNXX = function (UDE, UDOD) {
  26. var i, _UDTD, _UDID, _UDSD, _UDED, _UDWD, _UEL = UDE.length, _UDFD = $$("frag"); $(UDOD).addAttrArray({ "style": { "display": "block" }, "innerText": "" });
  27. for (i = 0; i < _UEL; i++) {
  28. UDE[i].PublishedDirectoryID = UDE[i].NF;
  29. _UDTD = $$("div", { "className": "UD_SYXTXOOT", "onclick": [[U.UF.M.StopBubble], [U.MD.D.PB.A.WAPMHBK, [UDE[i]]], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, "this"]]], "title": UDE[i].ArticleTitle }, _UDFD);
  30. _UDID = $$("div", { "className": "UD_SYXTXOOTL" }, _UDTD);
  31. $$("img", { "onerror": U.UF.M.ImgError, "title": "点击查看", "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDID); //U.MD.D.Blog.F.GSHGBL
  32. _UDSD = $$("div", { "className": "UD_SYXTXOOTR UTDF" }, _UDTD);
  33. _UDED = $$("div", { "className": "UD_SYXTXOOTRS" }, _UDSD);
  34. $$("div", { "className": "UD_SYXTXOOTRSN UTDF", "innerHTML": UDE[i].UserName }, _UDED);
  35. _UDWD = $$("div", { "className": "UD_SYXTXOOTRSC UTDF", "innerHTML": UDE[i].ArticleContentBrief }, _UDED); _UDWD.innerText = _UDWD.innerText.trim();
  36. _UDWD = $$("div", { "className": "UD_SYXTXOOTRX UTDF", "innerHTML": UDE[i].ReplyContent }, _UDSD); _UDWD.innerText = _UDWD.innerText.trim();
  37. $$("div", { "className": "UD_SYSSRXOMS UD_SYXTXOOTC", "innerHTML": "查看" }, _UDTD);
  38. }
  39. UDOD.appendChild(_UDFD);
  40. }
  41. //查看pb申请版块消息
  42. U.MD.D.Blog.N.SQBNXX = function (UDE, UDOD) {
  43. var _UTF, _UDTD, _UDFD = $$("frag");
  44. for (i = 0; i < UDE.length; i++) {
  45. _UTF = [[U.UF.M.StopBubble], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, "this"]]];
  46. (UDE[i].ArticleTitle != "0") && (_UTF = [[U.MD.D.PB.DJPBCKMU, [{ "ArticleID": "", "PublishedDirectoryID": UDE[i].ArticleID }, null]], [U.MD.D.H.HDSY, [["block", "none"], [false, ["block", "none", false]]]]].concat(_UTF));
  47. _UDTD = $$("div", { "className": "UD_SYXTXOOO", "onclick": _UTF }, _UDFD);
  48. $$("div", { "className": "UD_SYXTXOOOL UD_SYI" }, _UDTD);
  49. $$("div", { "className": "UD_SYXTXOOOZ", "innerHTML": "您申请的版块 \"<span>" + UDE[i].ArticleContentBrief + "</span>\" " + UDE[i].ReplyContent }, _UDTD);
  50. $$("div", { "className": "UD_SYXTXOOOR" + (_UTF ? " UD_SYXTXOOORO" : ""), "innerHTML": _UTF ? "关闭" : "查看", "onclick": _UTF ? [[U.UF.M.StopBubble], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, _UDTD]]] : null }, _UDTD);
  51. }
  52. UDOD.appendChild(_UDFD);
  53. }
  54. //查看Blog消息到上面区域
  55. U.MD.D.Blog.N.PNSXX = function (UDE, UDOD) {
  56. var i, _UDTD, _UDSD, _UDFD = $$("frag"); $(UDOD).addAttrArray({ "style": { "display": "block" }, "innerText": "" });
  57. for (i = 0; i < UDE.length; i++) {
  58. _UDTD = $$("div", { "className": "UD_SYSXZLRSRA", "style": i ? {} : { "marginLeft": "0px" }, "title": UDE[i].UserName, "onclick": [[U.UF.M.StopBubble], [U.MD.D.Blog.F.GSHGBL, [UDE[i]]], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, "this"]]] }, _UDFD);
  59. _UDSD = $$("div", { "className": "UD_SYSXZLRSRAI" }, _UDTD);
  60. $$("img", { "onerror": U.UF.M.ImgError, "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDSD);
  61. $$("div", { "className": "UD_SYSXZLRSRAT UD_SYI", "innerHTML": UDE[i].UCN }, _UDTD);
  62. }
  63. UDOD.appendChild(_UDFD);
  64. }
  65. //消息太多打印下面区域
  66. U.MD.D.Blog.N.PNXXX = function (UDOD, UDE) {
  67. var i, _UDOD, _UDTD, _UDGD, _UDID, _UDFD = $$("frag"); UDOD.innerText = "";
  68. for (i = 0; i < UDE.length; i++) {
  69. _UDOD = $$("div", { "className": "UD_SYSXZLRSROO", "onclick": [[U.UF.M.StopBubble], [U.MD.D.Blog.F.GSHGBL, [UDE[i]]], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, "this"]]] }, _UDFD);
  70. _UDTD = $$("div", { "className": "UD_SYSXZLRSROOL" }, _UDOD);
  71. $$("img", { "onerror": U.UF.M.ImgError, "title": "点击查看", "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead), "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE[i].ReplyAddUserID]]] }, _UDTD);
  72. _UDGD = $$("div", { "className": "UD_SYSXZLRSROOR" }, _UDOD);
  73. _UDID = $$("div", { "className": "UD_SYSXZLRSROORS" }, _UDGD);
  74. $$("div", { "className": "UD_SYSXZLRSROORSN", "innerHTML": UDE[i].UserName }, _UDID);
  75. $$("div", { "className": "UD_SYSXZLRSROORSN", "innerHTML": U.UF.D.getDateInterval(UDE[i].ReplyAddTime) }, _UDID);
  76. $$("div", { "className": "UD_SYSXZLRSROORX", "innerHTML": UDE[i].ReplyContent }, _UDGD);
  77. }
  78. UDOD.appendChild(_UDFD);
  79. }
  80. //消息取消
  81. U.MD.D.Blog.N.SNXX = function (UMID, UDE, UDOD) {
  82. var i, _UBE = US.forum.news[0], _UMID = UMID || _$(UDE).pluck("ArticleID"), UDPD = UDOD ? UDOD.parentNode : ""; (UMID) && (_UMID = [_UMID]);
  83. for (i = 0; i < _UMID.length; i++) { //移除消息的ID
  84. _$[UDE, _UBE].Delete({ "ArticleID": _UMID[i] });
  85. };
  86. _UMID = _UMID.join(",");
  87. if (UMID && UDOD) { //移除消息
  88. if (UDE.length) { $(UDOD).remove(); }
  89. else { UDOD = UDOD.parentNode; UDPD = UDOD.parentNode; };
  90. }
  91. (!UMID || !UDE.length) && (UDOD && (UDOD.innerText = "", UDPD.style.display = "none")); //所有消息消除
  92. U.MD.D.Blog.N.PNXX();
  93. U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_B_U_ModifyOneNewsState", _UMID, 0, 1, 2], U.UF.M.apply(), []); //重新打印消息 //将未读消息设为已读
  94. }
  95. //#endregion