Namespace.register("U.D.Blog.N"); //消息信息朋友圈 //#region 登录pbblog消息查看区域 //消息察看区域 U.D.Blog.N.PNXX = function () { var _UEL, _UBE, _UPE, _UKE, _UDAD, _UDMD, _UDE = US.PB.News[0], _UDOD = U.selectEl("#UD_TBCMOF"); if (_UDOD[0]) { _UDAD = _UDOD.Child(); _UDMD = U.selectEl(_UDAD[2]).Child()[1]; if ((_UEL = _UDAD[1].innerHTML = _UDE.length)) { //判断是否有消息通知 U.D.Blog.N.PNWB(_UDE); _UBE = _$(_UDE).Select({ "NF": null }); _UPE = _$(_UDE).Select({ "NF": US.PID }); _UKE = _$(_UDE).Select({ "NF": US.NU }); //朋友圈消息 pb消息 申请消息 if (_UBE.length) { U.D.Blog.N.PNSXX(_UBE, _UDMD); } if (_UPE.length || _UKE.length) { U.D.Blog.N.BNXX(_UPE, _UDMD); U.D.Blog.N.SQBNXX(_UKE, _UDAD[1]); } } _UDAD[2].style.display = _UEL ? "block" : "none"; } } //查看详细消息 U.D.Blog.N.PNXXD = function () { } //发送消息在客户端 U.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.M.GetImgU(UDE[i].UserThumbnailImageHead), "UsName": UDE[i].UserName, "UsType": "UPBR", "UsSYScontent": UDE[i].ReplyContent }); } if ((_UET = window.external)) { try { window.external.news(U.MS.SerializeJsonToStr(_UCE)); } catch (e) { } } } //查看PB数据 U.D.Blog.N.BNXX = function (UDE, UDOD) { var i, _UDTD, _UDID, _UDSD, _UDED, _UDWD, _UEL = UDE.length, _UDFD = $$("frag"); U.selectEl(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.M.StopBubble], [U.D.PB.A.WAPMHBK, ([UDE[i]])], [U.D.Blog.N.SNXX, ([UDE[i].ArticleID, UDE, "this"])]], "title": UDE[i].ArticleTitle }, _UDFD); _UDID = $$("div", { "className": "UD_SYXTXOOTL" }, _UDTD); $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDID); //U.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.D.Blog.N.SQBNXX = function (UDE, UDOD) { var _UTF, _UDTD, _UDFD = $$("frag"); for (i = 0; i < UDE.length; i++) { _UTF = [[U.M.StopBubble], [U.D.Blog.N.SNXX, ([UDE[i].ArticleID, UDE, "this"])]]; (UDE[i].ArticleTitle != "0") && (_UTF = [[U.D.PB.DJPBCKMU, ([{ "ArticleID": "", "PublishedDirectoryID": UDE[i].ArticleID }, null])], [U.D.SY.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.M.StopBubble], [U.D.Blog.N.SNXX, ([UDE[i].ArticleID, UDE, _UDTD])]] : null }, _UDTD); } UDOD.appendChild(_UDFD); } //查看Blog消息到上面区域 U.D.Blog.N.PNSXX = function (UDE, UDOD) { var i, _UDTD, _UDSD, _UDFD = $$("frag"); U.selectEl(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.M.StopBubble], [U.D.Blog.F.GSHGBL, ([UDE[i]])], [U.D.Blog.N.SNXX, ([UDE[i].ArticleID, UDE, "this"])]] }, _UDFD); _UDSD = $$("div", { "className": "UD_SYSXZLRSRAI" }, _UDTD); $$("img", { "onerror": U.M.ImgError, "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead) }, _UDSD); $$("div", { "className": "UD_SYSXZLRSRAT UD_SYI", "innerHTML": UDE[i].UCN }, _UDTD); } UDOD.appendChild(_UDFD); } //消息太多打印下面区域 U.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.M.StopBubble], [U.D.Blog.F.GSHGBL, ([UDE[i]])], [U.D.Blog.N.SNXX, ([UDE[i].ArticleID, UDE, "this"])]] }, _UDFD); _UDTD = $$("div", { "className": "UD_SYSXZLRSROOL" }, _UDOD); $$("img", { "onerror": U.M.ImgError, "title": "点击查看", "src": U.M.GetImgU(UDE[i].UserThumbnailImageHead), "onclick": [[U.M.StopBubble], [U.U.I.UIFZX, ([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.MT.getTDInterval(UDE[i].ReplyAddTime) }, _UDID); $$("div", { "className": "UD_SYSXZLRSROORX", "innerHTML": UDE[i].ReplyContent }, _UDGD); } UDOD.appendChild(_UDFD); } //消息取消 U.D.Blog.N.SNXX = function (UMID, UDE, UDOD) { var i, _UBE = US.PB.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) { U.selectEl(UDOD).remove(); } else { UDOD = UDOD.parentNode; UDPD = UDOD.parentNode; }; } (!UMID || !UDE.length) && (UDOD && (UDOD.innerText = "", UDPD.style.display = "none")); //所有消息消除 U.D.Blog.N.PNXX(); U.A.Request(US.CD, ([US.DB, "UseStudio_Friends", "UF_D_U_ModifyOneNewsState", _UMID, 0, 1, 2]), U.M.apply(), ([])); //重新打印消息 //将未读消息设为已读 } //#endregion