關于余杭區第24屆中小學普教、幼教、職(成)教教學專題論文評選的通知
      當前文章分類:首頁>教育科研>教科信息
更新時間:2019年1月16日
閱讀() | 评论()


    '; //str += bodyHtml; //str += '
    '; //str += ''; //oPop.document.write(str); //var oPop = window.open('', 'oPop'); //oPop.print(); //oPop.close(); window.print(); } function aa(str) { jQuery("#divNoView").html(str); jQuery("#divView").hide(); } function ShowReceiptConfirm(articleId, userId, userName, isReceipt) { jQuery(document).ready(function () { if (isReceipt == 1) { var result = confirm("当前文章需要已读签收,是否发送?"); if (result) { LogReceiptData(articleId, userId, userName, isReceipt) } } LogReceiptData(articleId, userId, userName, 0); //阅读记录,每次都记录 }); } //获取文章评分 function GetArticleClick(articleId) { jQuery.ajax({ type: "POST", contentType: "application/json", data: "{ articleId:'" + articleId + "'}", dataType: "json", url: "/widget/article/Service/ArticleWidgetService.asmx/GetSystemArticleClick", success: function (result) { jQuery("#Widget_20180123102226874_-2_lbClick").html(result.d[0]); jQuery("#Widget_20180123102226874_-2_lbCommentsCount").html(result.d[1]); } }); } //增加阅读量 function SetArticleStatistic() { var t = GetCookie("GrowUpEdu_ArticleTimeCookie_Article_readCount_" + ArticleId + ""); if (t == null) { jQuery.ajax({ type: "POST", contentType: "application/json", data: "{articleId:" +ArticleId + "}", dataType: "json", url: "/widget/article/Service/ArticleWidgetService.asmx/SetArticleReadUp", success: function (result) { if (result.d != "0") { SetCookie("GrowUpEdu_ArticleTimeCookie_Article_readCount_" + ArticleId + "", result.d); //jQuery("Widget_20180123102226874_-2_lbClick").html(result.d); } } }); } } jQuery(document).ready(function () { GetArticleClick("17456"); SetArticleStatistic(); var isPassed = "True"; if (isPassed == "False") { jQuery(".Print").hide(); jQuery(".pre").hide(); jQuery(".next").hide(); jQuery(".Click1").hide(); } GetLoginUserStatus(); if (ArticleId != 0) { InitArticleCommentList(); setInterval(InitArticleCommentList, 5000); InitCommentPage(); } }); //获取评论用户 function GetLoginUserStatus() { $.ajax({ type: "POST", contentType: "application/json", dataType: "json", async: false, url: "/widget/article/Service/ArticleWidgetService.asmx/GetUserLoginStatus", success: function (result) { var photo = result.d[0]; if (photo == "") { photo = ''; } $(".head-face p").html(photo); $("#nick-name").html(result.d[1]); LoginUser = result.d[2]; } }); } $("#btnInput").live("click", function () { if (ArticleId == 0) { LayerAlert("当前文章不存在!"); } else { $(".com-content").html('
    ' + '' + '
    ' + '
    ' + '' + '' + '' + '
    '); $('.emotion').qqFace({ id: 'facebox', assign: 'txtcontent', path: '/Images/arclist/' //表情存放的路径 }); $("#txtcontent").focus(); } }); $(".cancle_btn").live("click", function () { $(".com-content").html(''); }); $(".sub_btn").live("click", function () { Comment(); }); //插入评论 function Comment() { var nickName = $("#nick-name").text(); var content = $('#txtcontent').val(); if (content == "") { LayerAlert("评论内容不允许为空!"); return; } if (CheckInput(content)) { LayerAlert("评论内容含有敏感字符,不允许评论!"); return; } var parms = new Object(); parms["nickName"] = nickName; parms["content"] = content; if (ArticleId != 0) { parms["articleId"] = ArticleId; $.ajax({ type: "POST", contentType: "application/json", data: "{parms:'" + StringUtil.Base64Encode((jsonToString(parms))) + "'}", dataType: "json", url: "/widget/article/Service/ArticleWidgetService.asmx/InsertArticleComment", success: function (result) { if (result.d == 0) { alert("该评论需要管理员审核!"); } else if (result.d == -1) { LayerAlert("当前不能评论!"); } else { InitArticleCommentList(); } } }); } $('#txtcontent').val(""); } //加载文章评论 var CommentNum = 20; var CommentPage = 0; function InitArticleCommentList() { $.ajax({ async: false, type: "POST", contentType: "application/json", data: "{ count:'" + CommentNum + "',articleId:'" + ArticleId + "', pageIndex:'" + PageIndex + "'}", dataType: "json", url: "/widget/article/Service/ArticleWidgetService.asmx/GetArticleComments", success: function (result) { $('#info-show ul').html(""); $.each(result.d.List, function (i, item) { if (item != null) { $('#info-show ul').append(CreateHtmlComment(item)); } }); CommentPage = result.d.PageCount; } }); } function InitCommentPage() { $(".comment-page").html(""); if (CommentPage > 1) { $(".comment-page").createPage({ pageCount: CommentPage, current: PageIndex, backFn: function (p) { PageIndex = p; InitArticleCommentList(); } }); $(".comment-page").show(); } } //组合评论内容html function CreateHtmlComment(item) { var photoStr = ''; var photo = item.UserPhoto == null ? photoStr : ""; if (photo == "") { photo = ''; } var content = replace_em(item.Content); var html; html = '
  • '; html += '
    '; html += photo; html += '
    '; html += '
    '; html += '

    ' + item.UserName + '

    '; html += '

    ' + (content == null ? "" : content) + '

    '; html += ''; html += '
    '; html += '
  • '; return html; } //查看结果 function replace_em(str) { str = str.replace(/\/g, '>'); str = str.replace(/\n/g, '
    '); str = str.replace(/\[em_([0-9]*)\]/g, ''); return str; }