Namespace.register("U.MD.D.Blog.R"); //朋友圈评论 //#region 评论 //打印内容 U.MD.D.Blog.R.PBPGBL = function (UDE, UDOD) { var i, _UDE = ["block", "none"], _UDCD = $(UDOD).childg(0).Child(); if (!UDE && UDE["KZ"]) { _UDE.reverse(); } //取消 else {//打印 var i, _UTL, _UDTD, _UDFD = $$("frag"), _UDAD = $("div", _UDCD[0]), _UDID = U.UF.M.SetElement(UDE.ArticleContent, "img", "De"), UTH = _UDID[1].innerText; _UDCD[0].scrollTop = 0; _UDAD[16].innerText = _UDAD[2].innerText = _UDAD[8].innerText = ""; _UDAD[5].innerText = UDE.UserNickName || UDE.UserName; _UDAD[6].innerText = U.UF.D.getDateInterval(UDE.ArticleAddTime); _UDAD[7].innerText = UTH || "图片分享"; _UDAD.addAttrArray({ "innerText": (UDE.ArticleZFN === undefined ? UDE.AricitleReadNumber : UDE.ArticleZFN), "onclick": [[U.UF.M.StopBubble], [U.MD.D.Blog.A.PAZF, [UDE]]] }, 11); $$("img", { "onerror": U.UF.M.ImgError, "onclick": [[U.MD.U.I.ViewOtherUserInfo, [UDE.UserID]]], "src": U.UF.M.GetImgU(UDE.UserThumbnailImageHead), "title": "点击查看" }, _UDAD[2]); //用户头像 //用户发表的图片展示 _UDID[0][i].onclick || if ((_UTL = _UDID[0].length)) { for (i = 0; i < _UTL; i++) { $$("img", { "src": _UDID[0][i].src, "onclick": [[U.UF.M.StopBubble], [U.MD.I.Img, [UDE, [{ "Thm": _UDID[0][i].src, "Img": _UDID[0][i].alt.indexOf(US.FILESYSTEMURL) > -1 ? _UDID[0][i].alt : _UDID[0][i].src}]]]] }, _UDFD); } _UDAD[8].appendChild(_UDFD); } (_UDTD = _UDAD["UD_SYBNO"]).onclick = U.UF.M.apply(null, [[U.MD.D.Blog.R.FBHFRGBL, [UDE, _UDTD, null]]]); } for (i = 0; i < _UDE.length; i++) { _UDCD[i].style.display = _UDE[i]; } return _UDAD; } //滚动回复数据 U.MD.D.Blog.R.GDHFRGBL = function (UDE, UDOD) { U.MD.D.Blog.R.HFRGBL(UDE, UDOD, this.P + 2); } //用户回复数据 U.MD.D.Blog.R.HFRGBL = function (UDE, UDOD, P) { var _UDAD, _UGD = [undefined], _UET = U.MD.D.D.FYGBL(UDE.Reply, P), _UDTD = $(".UD_SYBAOO", UDOD)[0]; //获取回复数据 if (_UET[0]) { _UDAD = $("div", _UDTD); (P == 1) && (_UDAD["UD_SYBF"].innerText = "", _UDAD[14].innerText = UDE["ArticleReplayNumber"] || 0); if (_UET[0].length > 0) { (P == 1) && (U.MD.D.Blog.R.PHFRGBLPL(_UET[0], _UDAD[16]), _UGD[0] = U.UF.M.SSCH({ 'AF': U.UF.M.apply(null, [[U.MD.D.Blog.R.GDHFRGBL, [UDE, UDOD]]]) }).SCH()); U.MD.D.Blog.R.PHFRGBL(_UET[0], _UDAD["UD_SYBF"], null, UDE); } else { _UGD[0] = null; } (_UGD[0] !== undefined) && (_UDTD.onscroll = _UGD[0]); } //打印评论数据 else { U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_S_SelectArticleAllReply", UDE.ArticleID, (_UET[1] - 1) * 100, _UET[1] * 100]), U.MD.D.Blog.R.AsynHFRGBL, ["", UDE, UDOD, P, _UET[1]]; // U.UF.A.Request(US.AUTH,"pb.ReplyList", [UDE.ArticleID, (_UET[1] - 1) * 100, _UET[1] * 100]), U.MD.D.Blog.R.AsynHFRGBL, ["", UDE, UDOD, P, _UET[1]]; } //获取评论数据 } //异步获取回复数据 U.MD.D.Blog.R.AsynHFRGBL = function (r) { var i, context = r.context, _UDE = context[1], _UDOD = context[2], _UP = context[3], _UTP = context[4]; r = r.value; (_UDE.Reply == null) && (_UDE.Reply = []); _UDE.Reply[_UTP] = []; for (i = 0; i < r.length; i++) { if (!r[i].ReplyParentID) { _UDE.Reply[_UTP].push(r[i]); r[i]["RR"] = _$(r).Select({ "ReplyParentID": r[i].ReplyID }); } } U.MD.D.Blog.R.HFRGBL(_UDE, _UDOD, _UP); } //打印评论好友 U.MD.D.Blog.R.PHFRGBLPL = function (UDE, UDOD) { var i, _UET = {}, UDFD = $$("frag"); for (i = 0; i < UDE.length; i++) { if (!_UET[UDE[i].ReplyAddUserID]) { $$("img", { "onerror": U.UF.M.ImgError, "src": U.UF.M.GetImgU(UDE[i].UserThumbnailImageHead), "title": UDE[i].UserNickName, "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE[i].ReplyAddUserID]]] }, UDFD); _UET[UDE[i].ReplyAddUserID] = "Yes"; } } UDOD.appendChild(UDFD) } //打印回复数据 U.MD.D.Blog.R.PHFRGBL = function (UDE, UDPD, TF, UAE, UPE) { var i, j, _UME, _UKE, _UDTD, _UDSD, _UDFD = $$("frag"); _UKE = UDE.length == 1 ? UAE["Reply"][1] : UDE for (i = 0; i < UDE.length; i++) { _UDTD = U.MD.D.Blog.R.YSPHFRGBL(UDE[i], _UDFD, UAE, UPE || UDE[i], UPE ? UDPD : null, _UKE); _UME = UDE[i]["RR"]; //打印回复 for (j = 0; (_UME && j < _UME.length); j++) { U.MD.D.Blog.R.YSPHFRGBL(_UME[j], _UDTD, UAE, UDE[i], _UDTD, _UME); } //打印回复的回复 } if (TF && UDPD.firstChild) { UDPD.insertBefore(_UDFD, UDPD.firstChild); } else { UDPD.appendChild(_UDFD); } } //样式使用 U.MD.D.Blog.R.YSPHFRGBL = function (UDE, UDOD, UAE, UPE, UDMD, UME) { var _UDTD, _UDMD, _UDSD, _UDED, _UDGD, _UDJD, _UTF = UDE.ReplyAddUserID == US.userInfo.userid; _UDTD = $$("div", { "className": "UD_SYBFO" }, UDOD); _UDSD = $$("div", { "className": "UD_SYBFOI" }, _UDTD); $$("img", { "onerror": U.UF.M.ImgError, "title": UDE.UserNickName, "src": U.UF.M.GetImgU(UDE.UserThumbnailImageHead), "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE.ReplyAddUserID]]] }, _UDSD); _UDED = $$("div", { "className": "UD_SYBFOZ" }, _UDTD); _UDGD = $$("div", { "className": "UD_SYBFOZK" }, _UDED); $$("div", { "className": "UD_SYBFOZTN", "innerHTML": UDE.UserNickName, "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE.ReplyAddUserID]]] }, _UDGD); _UDJD = $$("div", { "className": "UD_SYBFOZTO" }, _UDGD); $$("div", { "className": "UD_SYBFOZT", "innerHTML": U.UF.D.getDateInterval(UDE.ReplyAddTime) }, _UDJD); _UDSD = $$("div", { "className": "UD_SYBFT" }, _UDTD); $$("div", { "className": "UD_SYBFOZTK" + (_UTF ? " UD_SYBFOZTKO" : ""), "title": _UTF ? "删除" : "回复", "innerHTML": _UTF ? "删除" : "回复", "onclick": _UTF ? [[U.UF.UI.Confirm, ["是否撤销评论", [U.MD.D.Blog.R.SCPHFRGBL, [UME, UDE, UAE, _UDTD]]]]] : [[U.MD.D.Blog.R.TCPHFRGBL, [UAE, _UDSD, UPE, UDMD]]] }, _UDJD); (UDE.ParentUserNickName) && ($$("div", { "className": "UD_SYBFOZKT", "innerHTML": "回复" }, _UDGD), $$("div", { "className": "UD_SYBFOZKO", "innerHTML": "@" + UDE.ParentUserNickName, "onclick": [[U.UF.M.StopBubble], [U.MD.U.I.ViewOtherUserInfo, [UDE.ParentUserId]]] }, _UDGD)); $$("div", { "className": "UD_SYBFOZC UC_TF", "innerHTML": UDE.ReplyContent, "onselectstart": [[U.UF.M.StopBubble], [U.UF.M.apply(this, "return true")]] }, _UDED); return _UDSD; } //评论查看 U.MD.D.Blog.R.PLCKBL = function (UDOD) { if (!U.MD.U.L.isLogin(3)) { U.UF.MR.InputTip(UDOD, ["发表回复...", ""]); } //发表回复 else { UDOD = $($(UDOD).Parent(6)); U.MD.D.H.ET.DLHD = [U.UF.M.apply(UDOD, [[UDOD.addAttrArray, [{ "style": { "display": "block"}}]]])]; } //评论查看 } //删除评论 U.MD.D.Blog.R.SCPHFRGBL = function (UPE, UDE, UAE, UDOD) { if (!U.MD.U.L.isLogin(3)) { var _URID, _UAID, _UCB; if (U.UF.Ut.isString(UPE)) { _URID = UPE; _UAID = UDE || US.EMPTYGUID; _UCB = UAE; } else { UPE.splice(UPE.indexOf(UDE), 1); $("#UD_SYBK&div")[4].innerText -= 1 + (UDE["RR"] ? UDE["RR"].length : 0); $(UDOD).remove(); _URID = UDE.ReplyID; _UAID = UAE.ArticleID; } //移除评论 //移除元素 //评论数-1 U.UF.A.Request(US.CROSSDOMAIN, [US.DB, "UseStudio_Blog", "UB_P_D_DeleteOneReplyAndAllChildReply", US.userInfo.userid, _URID, _UAID || US.EMPTYGUID]), _UCB || U.UF.M.apply, [""]; //服务器同步 // U.UF.A.Request(US.AUTH,"pb.DeleteOneReplyAndChildReply", [US.userInfo.userid, _URID, UAID || US.EMPTYGUID]), _UCB || U.UF.M.apply, [""]; //服务器同步 } } //弹出回复的回复框 U.MD.D.Blog.R.TCPHFRGBL = function (UAE, UDOD, UPE, UDMD) { if (!U.MD.U.L.isLogin(3)) { var _UDAD, _UDTD = $("#UD_SYBNK")[0]; if (!_UDTD) { _UDTD = $("#UD_SYBN")[0].parentNode.cloneNode(true); _UDTD.id = "UD_SYBNK"; $(_UDTD).Child()[0].onblur = U.MD.D.Blog.R.YCTCPHFRGBL; }; $($(_UDTD).Child()[0]).addAttrArray({ "id": "", "innerHTML": "" }); _UDTD.style.display = "block"; _UDAD = $(_UDTD).Child(); _UDAD[1].onclick = U.UF.M.apply(this, [[U.MD.D.Blog.R.FBHFRGBL, [UAE, _UDAD[1], UPE, _UDTD, UDMD]]]); UDOD.insertBefore(_UDTD, UDOD.firstChild); _UDAD[0].focus(); } } //移除评论框 U.MD.D.Blog.R.YCTCPHFRGBL = function () { var _UDTD = $(this.parentNode); setTimeout(U.UF.M.apply(_UDTD, [[_UDTD.addAttrArray, [{ "style": { "display": "none"}}]]]), 500); //延迟执行 } //发表评论 U.MD.D.Blog.R.FBHFRGBL = function (UAE, UDOD, UPE, UDTD, UDMD) { var _UDED = U.UF.M.GTCN(UDOD.parentNode.childNodes)[0], _UHT = _UDED.innerHTML; if (_UHT != "发表回复..." && _UHT != "") { U.UF.A.Request(US.AUTH, ["ReportReply", UAE.ArticleID, _UDED.innerHTML, UPE ? (UPE.ReplyParentID || UPE.ReplyID) : "", UPE ? UPE.ReplyAddUserID : ""]), U.MD.D.Blog.R.AsynFBHFRGBL, ["", UAE, _UDED.innerHTML, UPE, UDTD, UDMD]; (UDTD) && (UDTD.style.display = "none"); _UDED.innerText = "发表回复..."; U.Alert("正在发送中..."); } } //添加回复 U.MD.D.Blog.R.TJFBHFRG = function (UAID, UTH) { if (!U.MD.U.L.isLogin(3)) { var _UCB, _UPID = "", _UUID = "", _UDE = arguments; if (_UDE.length < 4) { _UCB = _UDE[2]; } else { _UPID = _UDE[3]; _UUID = _UDE[4]; _UCB = _UDE[5]; } U.UF.A.Request(US.AUTH, ["ReportReply", US.userInfo.userid, UAID, UTH, _UPID, _UUID], U.MD.D.Blog.R.AsynTJFBHFRG, ["", _UCB]); //添加回复到后台 } } //添加回复异步 U.MD.D.Blog.R.AsynTJFBHFRG = function (r) { var context = r.context, _UCB = context[1]; r = r.value; (_UCB) && (_UCB(r)); } //发表评论成功异步 U.MD.D.Blog.R.AsynFBHFRGBL = function (reuqest) { var _UKE, _UME, UPE, _UTH, _UAE, _UDOD, _UDMD, _UDP; context = reuqest.context; reuqest = reuqest.value; _UAE = context[1]; _UTH = context[2]; UPE = context[3]; _UDOD = context[4]; _UDMD = context[5]; _UDPD = $("#UD_SYB" + _UAE.ArticleID).find("div")["UD_SYBF"]; (_UKE = (UPE ? UPE["RR"] : _UAE["Reply"][1])).unshift((_UME = new U.MD.D.Blog.R.FRGBLET[_UKE[0] ? (_UKE[0].AllCount + 1) : 1, UPE ? UPE.UserNickName : "", U.UF.D.toTimeStamp(new Date()), US.userInfo.userid, _UTH, reuqest, UPE ? UPE.ReplyID : "", UPE ? UPE.ReplyAddUserID : "", US.userInfo.UserNickName, US.userInfo.UserThumbnailImageHead])); //添加新的类 (!UPE) && (_UME["RR"] = []); U.MD.D.Blog.R.PHFRGBL([_UME], (UPE ? (_UDMD || _UDOD.parentNode) : _UDPD), true, _UAE, UPE); $("div", _UDPD.parentNode)[14].innerText = _UME.AllCount; //添加回复 } //回复的实体 U.MD.D.Blog.R.FRGBLET = function (UDE) { var i = UDE.length, _UET = ["AllCount", "ParentUserNickName", "ReplyAddTime", "ReplyAddUserID", "ReplyContent", "ReplyID", "ReplyParentID", "ReplyVerifyUserID", "UserNickName", "UserThumbnailImageHead"] while (i--) { this[_UET[i]] = UDE[i] } } //展开缩小消息发送 U.MD.D.Blog.R.SGBL = function (UDOD, TF) { var _UDPD = UDOD.parentNode, _UDE = ["block", { "width": "310px", "height": "25px" }, "none", "UD_SYSXZLRSSV UD_SYI"], _UDAD = $(_UDPD).Child(), _UDCD = $("div", _UDAD[1]); UDOD = $(UDOD); (TF) && (_UDE[0] = "none", _UDE[1] = { "width": "100%", "height": "100px" }, _UDE[2] = "block", _UDE[3] = "UD_SYSXZLRSSVA"); UDOD.addAttrArray({ "style": _UDE[1] }); _UDAD[1].className = _UDE[3]; _UDCD[0].style.display = _UDE[2]; //U.MD.D.H.DTGBL(_UDCD[1], true); } //#endregion