mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-15 13:46:39 +00:00
模版更新
This commit is contained in:
@ -22,21 +22,23 @@
|
||||
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="nav_sub">
|
||||
<a href="/" th:text="${application.website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||
<a href="/" th:text="${application.website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}"
|
||||
th:text="${book.catName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>
|
||||
</div>
|
||||
<div class="channelWrap channelBookInfo cf">
|
||||
<div class="bookCover cf">
|
||||
<a th:href="${book.picUrl}" class="book_cover"><img class="cover" th:src="${book.picUrl}"
|
||||
th:attr="alt=${book.bookName}"/></a>
|
||||
th:attr="alt=${book.bookName}"/></a>
|
||||
<div class="book_info">
|
||||
<div class="tit">
|
||||
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
||||
th:utext="${book.authorName}+' 著'"></a>
|
||||
th:utext="${book.authorName}+' 著'"></a>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
|
||||
<span class="item" th:switch="${book.bookStatus}">状态:<em th:case="'0'">连载中</em><em th:case="*">已完结</em></span>
|
||||
<span class="item" th:switch="${book.bookStatus}">状态:<em th:case="'0'">连载中</em><em
|
||||
th:case="*">已完结</em></span>
|
||||
<span class="item">总点击:<em id="cTotal" th:text="${book.visitCount}"></em></span>
|
||||
<span class="item">总字数:<em th:text="${book.wordCount}"></em></span></li>
|
||||
</ul>
|
||||
@ -70,7 +72,9 @@
|
||||
</div>
|
||||
<ul class="list cf">
|
||||
<li>
|
||||
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:utext="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||
<span class="fl font16"> <a
|
||||
th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'"
|
||||
th:utext="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||
<span class="black9 fr"
|
||||
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</li>
|
||||
@ -86,21 +90,46 @@
|
||||
<div class="bookComment">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>作品评论区</h3><span id="bookCommentTotal" th:text="'('+${bookCommentPageBean.total}+'条)'"></span>
|
||||
<h3>作品评论区</h3><span id="bookCommentTotal"
|
||||
th:text="'('+${bookCommentPageBean.total}+'条)'"></span>
|
||||
</div>
|
||||
<a class="fr" href="#txtComment">发表评论</a>
|
||||
</div>
|
||||
<div class="no_comment" id="noCommentPanel" th:style="${bookCommentPageBean.total > 0}? 'display:none'" >
|
||||
<div class="no_comment" id="noCommentPanel"
|
||||
th:style="${bookCommentPageBean.total > 0}? 'display:none'">
|
||||
<img src="/images/no_comment.png" alt=""/>
|
||||
<span class="block">暂无评论</span>
|
||||
</div>
|
||||
<div class="commentBar" id="commentPanel" th:style="${bookCommentPageBean.total == 0}? 'display:none'">
|
||||
<div th:each="comment: ${bookCommentPageBean.list}" class="comment_list cf"><div class="user_heads fl" vals="389"><img th:src="${comment.createUserPhoto}?${comment.createUserPhoto}:'/images/man.png'" class="user_head" alt=""><span class="user_level1" style="display: none;">见习</span></div><ul class="pl_bar fr"> <li class="name" th:text="${#strings.substring(comment.createUserName,0,4)}+'****'+${#strings.substring(comment.createUserName,#strings.length(comment.createUserName)-3,#strings.length(comment.createUserName))}"></li><li class="dec" th:utext="${comment.commentContent}"></li><li class="other cf"><span class="time fl" th:text="${#calendars.format(comment.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span><span class="fr"><a href="javascript:void(0);" onclick="javascript:BookDetail.AddAgreeTotal(77,this);" class="zan" style="display: none;">赞<i class="num">(0)</i></a></span></li> </ul> </div>
|
||||
<div class="commentBar" id="commentPanel"
|
||||
th:style="${bookCommentPageBean.total == 0}? 'display:none'">
|
||||
<div th:each="comment: ${bookCommentPageBean.list}" class="comment_list cf">
|
||||
<div class="user_heads fl" vals="389"><img
|
||||
th:src="${comment.createUserPhoto}?${comment.createUserPhoto}:'/images/man.png'"
|
||||
class="user_head" alt=""><span class="user_level1"
|
||||
style="display: none;">见习</span></div>
|
||||
<ul class="pl_bar fr">
|
||||
<li class="name"><span
|
||||
th:text="${#strings.substring(comment.createUserName,0,4)}+'****'+${#strings.substring(comment.createUserName,#strings.length(comment.createUserName)-3,#strings.length(comment.createUserName))}"></span><span
|
||||
style="padding-left: 10px" class="other" th:if="${comment.location}"
|
||||
th:text="${comment.location} + '读者'"></span></span></li>
|
||||
<li class="dec" th:utext="${comment.commentContent}"></li>
|
||||
<li class="other cf"><span class="time fl"
|
||||
th:text="${comment.createTimeFormat}"></span><span
|
||||
class="fr"><a th:href="'javascript:toggleCommentUnLike(\''+${comment.id}+'\')'" onclick="javascript:;" class="zan"
|
||||
style="padding-left: 10px">踩<i class="num" th:id="'unLikeCount'+${comment.id}">([[${comment.unLikesCount}]])</i></a></span><span
|
||||
class="fr"><a th:href="'javascript:toggleCommentLike(\''+${comment.id}+'\')'" class="zan"
|
||||
style="padding-left: 10px">赞<i class="num" th:id="'likeCount'+${comment.id}">([[${comment.likesCount}]])</i></a></span><span
|
||||
class="fr"><a th:href="'/book/reply-'+${comment.id}+'.html'" class="zan"
|
||||
style="padding-left: 10px">回复<i class="num">([[${comment.replyCount}]])</i></a></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--无评论时此处隐藏-->
|
||||
<div class="more_bar" id="moreCommentPanel" th:style="${bookCommentPageBean.total == 0}? 'display:none'">
|
||||
<div class="more_bar" id="moreCommentPanel"
|
||||
th:style="${bookCommentPageBean.total == 0}? 'display:none'">
|
||||
<a th:href="'/book/comment-'+${book.id}+'.html'">查看全部评论></a>
|
||||
</div>
|
||||
|
||||
@ -109,7 +138,7 @@
|
||||
<span class="fl font16">发表评论</span>
|
||||
<!--未登录状态下不可发表评论,显示以下链接-->
|
||||
<span class="fr black9" style="display:none; ">请先 <a class="orange"
|
||||
href="/user/login.html">登录</a><em
|
||||
href="/user/login.html">登录</a><em
|
||||
class="ml10 mr10">|</em><a class="orange"
|
||||
href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
@ -175,10 +204,12 @@
|
||||
<li th:each="book : ${recBooks}">
|
||||
<div class="book_intro">
|
||||
<div class="cover">
|
||||
<a th:href="'/book/'+${book.id}+'.html'"><img th:src="${book.picUrl}" th:alt="${book.bookName}"></a>
|
||||
<a th:href="'/book/'+${book.id}+'.html'"><img th:src="${book.picUrl}"
|
||||
th:alt="${book.bookName}"></a>
|
||||
</div>
|
||||
<div class="dec">
|
||||
<a class="book_name" th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>
|
||||
<a class="book_name" th:href="'/book/'+${book.id}+'.html'"
|
||||
th:text="${book.bookName}"></a>
|
||||
<a class="txt" th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookDesc}">
|
||||
|
||||
</a>
|
||||
@ -210,7 +241,7 @@
|
||||
var bookId = pathname.substring(pathname.lastIndexOf("/") + 1, pathname.lastIndexOf("."))
|
||||
//查询章节信息
|
||||
var lastBookIndexId = $("#lastBookIndexId").val();
|
||||
if(lastBookIndexId){
|
||||
if (lastBookIndexId) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/queryBookIndexAbout",
|
||||
@ -232,7 +263,7 @@
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
$("#optBtn").remove();
|
||||
}
|
||||
</script>
|
||||
@ -264,9 +295,6 @@
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var currentBId = 37, spmymoney = 0;
|
||||
var relationStep = 0;
|
||||
var authorUId = 8;
|
||||
@ -283,7 +311,6 @@
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#AuthorOtherNovel li").unbind("mouseover");
|
||||
|
||||
$('#txtComment').on('input propertychange', function () {
|
||||
@ -301,7 +328,7 @@
|
||||
});
|
||||
|
||||
|
||||
function loadCommentList(){
|
||||
function loadCommentList() {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/listCommentByPage",
|
||||
@ -311,20 +338,25 @@
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#bookCommentTotal").html("("+data.data.total+"条)");
|
||||
$("#bookCommentTotal").html("(" + data.data.total + "条)");
|
||||
var commentListHtml = "";
|
||||
for (var i = 0; i < commentList.length; i++) {
|
||||
var comment = commentList[i];
|
||||
commentListHtml += ("<div class=\"comment_list cf\">" +
|
||||
"<div class=\"user_heads fl\" vals=\"389\">" +
|
||||
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
|
||||
"<img src=\"" + (comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png') + "\" class=\"user_head\" alt=\"\">" +
|
||||
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName)+"</li><li class=\"dec\">" +
|
||||
comment.commentContent+
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">" + (comment.createUserName) + "<span style='padding-left: 10px' class=\"other\">" + (comment.location ? comment.location + "读者" : '') + "</span></li><li class=\"dec\">" +
|
||||
comment.commentContent +
|
||||
"</li><li class=\"other cf\">" +
|
||||
"<span class=\"time fl\">"+comment.createTime+"</span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
|
||||
"</span></li>\t\t</ul>\t</div>");
|
||||
"<span class=\"time fl\">" + comment.createTime + "</span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:toggleCommentUnLike('"+comment.id+"')\" class=\"zan\" style=\"padding-left: 10px\">踩<i class=\"num\" id='unLikeCount"+comment.id+"'>("+comment.unLikesCount+")</i></a></span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:toggleCommentLike('"+comment.id+"')\" class=\"zan\" style=\"padding-left: 10px\">赞<i class=\"num\" id='likeCount"+comment.id+"'>("+comment.likesCount+")</i></a></span>" +
|
||||
"<span class=\"fr\"><a href=\"/book/reply-"+comment.id+".html\" class=\"zan\" style=\"padding-left: 10px\">回复<i class=\"num\">("+comment.replyCount+
|
||||
")</i></a></span>" +
|
||||
"</li>\t\t</ul>\t</div>"
|
||||
)
|
||||
;
|
||||
}
|
||||
$("#commentPanel").html(commentListHtml);
|
||||
$("#noCommentPanel").hide();
|
||||
@ -348,6 +380,55 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
function toggleCommentLike(commentId) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/book/toggleCommentLike",
|
||||
data: {'commentId': commentId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#likeCount"+commentId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function toggleCommentUnLike(commentId) {
|
||||
$.ajax({
|
||||
type: "post",
|
||||
url: "/book/toggleCommentUnLike",
|
||||
data: {'commentId': commentId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#unLikeCount"+commentId).text("("+data.data+")")
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
Reference in New Issue
Block a user