' + content + '
(感谢参与评论,您的评论内容将在审核后公开。)
'); // 把未审的写到cookie里 //setCookie(UN_AUDIT_COOKIE_NAME + data.topicId, data.commentId, '.pchouse.com.cn'); } else { // 先出后审 nc = nc.replaceAll("", "回复支持(0)"); // add comment_total var a = $("#comment_total").html(); a++; $("#comment_total").html(a); $("#comment_total2").html(a); } $('#commentTable').prepend(nc); $('#content').val(""); res = res + cmt4_getExtraAuditInfo(); } if(document.getElementById("needAlert")){ alert(res); } //是否显示验证码(当用户在1分钟内发表5条以上评论,第6条评论将需要输入验证码,输入验证码提交成功后,下次默认不需输入验证码,以此循环。) // alert(data.commentCount+"...."+5); var captcha = false; if(captcha){ if(document.getElementById("spCode"))document.getElementById("spCode").style.display = 'none'; document.getElementById("needCaptcha").value = "1"; if(document.getElementById('captcha_line'))document.getElementById('captcha_line').style.display = ''; }else{ if(data.commentCount > 5){ if(document.getElementById("spCode"))document.getElementById("spCode").style.display = 'none'; document.getElementById("needCaptcha").value = "1"; if(document.getElementById('captcha_line'))document.getElementById('captcha_line').style.display = ''; cmt4_chgCap(); }else{ if(document.getElementById("spCode"))document.getElementById("spCode").style.display = ''; document.getElementById("needCaptcha").value = "0"; if(document.getElementById('captcha_line'))document.getElementById('captcha_line').style.display = 'none'; } } if(data.resultCode != -8 && data.resultCode != 1 && data.resultCode != 0) { alert(res); } //变换验证码 if(document.getElementById("captcha")){ document.getElementById("captcha").value = ""; cmt4_chgCap(); if(data.resultCode==-9){ document.getElementById("captcha").focus(); } } if(data.resultCode!=-9){ $('#content').focus(); } return false; }; var errorHandle = function() { alert('数据提交失败 ╮(╯_╰)╭ ,尝试重新提交或刷新'); }; var completeHandle = function() { if(document.getElementById('Submit'))document.getElementById('Submit').disabled=false; if(document.getElementById('content')) document.getElementById('content').removeAttribute('data-submit'); }; postCORS(postUrl, function(data) { data = data.replace(/\\/g,"\\\\"); try { data = eval('('+data+')'); successHandle(data); } catch(e) { errorHandle(); } completeHandle(); }, postData, {withCookie: true}); }); return false; } function cmt4_comment_pop() { cmt4_getArea(); cmt4_needJS(window.jQuery,'//www1.pconline.com.cn/script/jquery-pconline1.2.js',function(){ var $=window.jQuery; cmt4_cleanMsg(); //var postUrl = "http://cmt.pchouse.com.cn/action/comment/create.jsp"; var postUrl = "//cmt.pchouse.com.cn/action/comment/create.jsp"; var postData = { isEncode: 1, content: encodeURI($("#content_pop").val()), id: $("#id_pop").val(), captcha: $("#captcha_pop").val(), needCaptcha: $("#needCaptcha_pop").val(), username: encodeURI($("#usernameInput").val()), url: $("#url").val(), title: encodeURI($("#title_pop").val()), columnId: '', area: encodeURI($("#area").val()), urlHandle: '', replyFloor2: $("#replyFloor").val() }; var successHandle = function(data) { var res = data.resultMsg; if(data.resultCode>=0) { var afterAudit = (data.resultCode == 0); var nc = "" + $('#newComment').html() + ""; var userJump = '//my.pchouse.com.cn/'; if(data.userId > 0 && userJump != ''){ nc = nc.replace('',''+data.showName+''); } nc = nc.replace("", data.floor); nc = nc.replace("", data.floor); nc = nc.replace("", data.showName); nc = nc.replace("", data.showName); nc = nc.replace("", data.commentId); nc = nc.replace("", data.createTime.substring(data.createTime.indexOf("-")+1)); nc = nc.replace("", data.brief); var quoteSpan = document.getElementById("quoteSpan"); if(quoteSpan){ if('pchouse'=='pcauto'){//for pcauto nc = nc.replace("",quoteSpan.innerHTML); }else{ if(data.brief == ''){ nc = nc.replace("",quoteSpan.innerHTML); } } } nc = nc.replace("",""); if(quoteSpan) quoteSpan.innerHTML = ""; if(afterAudit){//先审后出不能引用和回复 // 添加先审后出提示 nc = nc.replace("",'(感谢参与评论,您的评论内容将在审核后公开。)
'); // 把未审的写到cookie里 setCookie(UN_AUDIT_COOKIE_NAME + data.topicId, data.commentId, '.pchouse.com.cn'); } else { // 先出后审 var createTime = data.createTime; // 2011-05-11 15:43:50返回的时间格式 if(createTime) { var i = createTime.indexOf("-"); if(i != -1) { createTime = createTime.substring(i, createTime.length); } } nc = nc.replace("", "回复支持(0)"); // add comment_total var a = $("#comment_total").html(); a++; $("#comment_total").html(a); } nc = nc.replace("", "