Namespace.register("U.MD.D.Blog.N"); //消息信息朋友圈 //#region 登录pbblog消息查看区域 //消息察看区域 U.MD.D.Blog.N.PNXX = function () { var _UEL, _UBE, _UPE, _UKE, _UDAD, _UDMD, _UDE = US.forum.news[0], _UDOD = $("#UD_TBCMOF"); if (_UDOD[0]) { _UDAD = _UDOD.Child(); _UDMD = $(_UDAD[2]).Child()[1]; if ((_UEL = _UDAD[1].innerHTML = _UDE.length)) { //判断是否有消息通知 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消息 申请消息 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]); } } _UDAD[2].style.display = _UEL ? "block" : "none"; } } //查看详细消息 U.MD.D.Blog.N.PNXXD = function () { } //发送消息在客户端 U.MD.D.Blog.N.PNWB = function (UDE) { var i, _UET, _UCE = []; 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 }); } if ((_UET = window.external)) { try { window.external.news(U.UF.S.jsonToStr(_UCE)); } catch (e) { } } } //查看PB数据 U.MD.D.Blog.N.BNXX = function (UDE, UDOD) { var i, _UDTD, _UDID, _UDSD, _UDED, _UDWD, _UEL = UDE.length, _UDFD = $$("frag"); $(UDOD).addAttrArray({ "style": { "display": "block" }, "innerText": "" }); for (i = 0; i < _UEL; i++) { UDE[i].PublishedDirectoryID = UDE[i].NF; _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); _UDID = $$("div", { "className": "UD_SYXTXOOTL" }, _UDTD); $$("img", { "onerror": U.UF.M.ImgError, "title": "点击查看", "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDID); //U.MD.D.Blog.F.GSHGBL _UDSD = $$("div", { "className": "UD_SYXTXOOTR UTDF" }, _UDTD); _UDED = $$("div", { "className": "UD_SYXTXOOTRS" }, _UDSD); $$("div", { "className": "UD_SYXTXOOTRSN UTDF", "innerHTML": UDE[i].UserName }, _UDED); _UDWD = $$("div", { "className": "UD_SYXTXOOTRSC UTDF", "innerHTML": UDE[i].ArticleContentBrief }, _UDED); _UDWD.innerText = _UDWD.innerText.trim(); _UDWD = $$("div", { "className": "UD_SYXTXOOTRX UTDF", "innerHTML": UDE[i].ReplyContent }, _UDSD); _UDWD.innerText = _UDWD.innerText.trim(); $$("div", { "className": "UD_SYSSRXOMS UD_SYXTXOOTC", "innerHTML": "查看" }, _UDTD); } UDOD.appendChild(_UDFD); } //查看pb申请版块消息 U.MD.D.Blog.N.SQBNXX = function (UDE, UDOD) { var _UTF, _UDTD, _UDFD = $$("frag"); for (i = 0; i < UDE.length; i++) { _UTF = [[U.UF.M.StopBubble], [U.MD.D.Blog.N.SNXX, [UDE[i].ArticleID, UDE, "this"]]]; (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)); _UDTD = $$("div", { "className": "UD_SYXTXOOO", "onclick": _UTF }, _UDFD); $$("div", { "className": "UD_SYXTXOOOL UD_SYI" }, _UDTD); $$("div", { "className": "UD_SYXTXOOOZ", "innerHTML": "您申请的版块 \"" + UDE[i].ArticleContentBrief + "\" " + UDE[i].ReplyContent }, _UDTD); $$("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); } UDOD.appendChild(_UDFD); } //查看Blog消息到上面区域 U.MD.D.Blog.N.PNSXX = function (UDE, UDOD) { var i, _UDTD, _UDSD, _UDFD = $$("frag"); $(UDOD).addAttrArray({ "style": { "display": "block" }, "innerText": "" }); for (i = 0; i < UDE.length; i++) { _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); _UDSD = $$("div", { "className": "UD_SYSXZLRSRAI" }, _UDTD); $$("img", { "onerror": U.UF.M.ImgError, "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDSD); $$("div", { "className": "UD_SYSXZLRSRAT UD_SYI", "innerHTML": UDE[i].UCN }, _UDTD); } UDOD.appendChild(_UDFD); } //消息太多打印下面区域 U.MD.D.Blog.N.PNXXX = function (UDOD, UDE) { var i, _UDOD, _UDTD, _UDGD, _UDID, _UDFD = $$("frag"); UDOD.innerText = ""; for (i = 0; i < UDE.length; i++) { _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); _UDTD = $$("div", { "className": "UD_SYSXZLRSROOL" }, _UDOD); $$("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); _UDGD = $$("div", { "className": "UD_SYSXZLRSROOR" }, _UDOD); _UDID = $$("div", { "className": "UD_SYSXZLRSROORS" }, _UDGD); $$("div", { "className": "UD_SYSXZLRSROORSN", "innerHTML": UDE[i].UserName }, _UDID); $$("div", { "className": "UD_SYSXZLRSROORSN", "innerHTML": U.UF.D.getDateInterval(UDE[i].ReplyAddTime) }, _UDID); $$("div", { "className": "UD_SYSXZLRSROORX", "innerHTML": UDE[i].ReplyContent }, _UDGD); } UDOD.appendChild(_UDFD); } //消息取消 U.MD.D.Blog.N.SNXX = function (UMID, UDE, UDOD) { var i, _UBE = US.forum.news[0], _UMID = UMID || _$(UDE).pluck("ArticleID"), UDPD = UDOD ? UDOD.parentNode : ""; (UMID) && (_UMID = [_UMID]); for (i = 0; i < _UMID.length; i++) { //移除消息的ID _$[UDE, _UBE].Delete({ "ArticleID": _UMID[i] }); }; _UMID = _UMID.join(","); if (UMID && UDOD) { //移除消息 if (UDE.length) { $(UDOD).remove(); } else { UDOD = UDOD.parentNode; UDPD = UDOD.parentNode; }; } (!UMID || !UDE.length) && (UDOD && (UDOD.innerText = "", UDPD.style.display = "none")); //所有消息消除 U.MD.D.Blog.N.PNXX(); U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_B_U_ModifyOneNewsState", _UMID, 0, 1, 2], U.UF.M.apply(), []); //重新打印消息 //将未读消息设为已读 } //#endregion