Authored by 2586703@qq.com

评论插件修改

... ... @@ -80,6 +80,7 @@ require("./login");
dataType: 'jsonp',
jsonp: 'callback',
success: function(response) {
console.log(response);
var data = response.data, //返回数据的data
viewMoreNum = data.total - 5, //评论总数-5,除显示评论剩下的评论数量
moreString = viewMoreNum + '', //剩余评论数量转为字符串
... ... @@ -114,12 +115,12 @@ require("./login");
more: {
moreNum: viewMoreNum
},
page: commentPage
page: {
pageList: commentPage
}
}
}
commentHtml = mustache.render(commentTpl, commentData, {
html: commentPage
});
commentHtml = mustache.render(commentTpl, commentData);
that.$element.prepend($(commentHtml));
//5条后的评论隐藏
... ...