mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
190
templates/green/html/book/book_comment.html
Normal file
190
templates/green/html/book/book_comment.html
Normal file
@ -0,0 +1,190 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:text="${book.bookName}+'作品评论区_'+${application.website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
|
||||
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'" />
|
||||
<link href="/css/main.css" rel="stylesheet" />
|
||||
<link href="/css/book.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="channelBookContent cf">
|
||||
<!--left start-->
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
<div class="pad20">
|
||||
|
||||
<div class="bookComment">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>作品评论区</h3><span id="bookCommentTotal">(0条)</span>
|
||||
</div>
|
||||
<a class="fr" href="#txtComment">发表评论</a>
|
||||
</div>
|
||||
<div class="no_comment" id="noCommentPanel" style="display: none;">
|
||||
<img src="/images/no_comment.png" alt="" />
|
||||
<span class="block">暂无评论</span>
|
||||
</div>
|
||||
<div class="commentBar" id="commentPanel">
|
||||
|
||||
</div>
|
||||
<div class="pageBox cf mt15 mr10" id="commentPage">
|
||||
</div>
|
||||
|
||||
<div class="reply_bar" id="reply_bar">
|
||||
<div class="tit">
|
||||
<span class="fl font16">发表评论</span>
|
||||
<!--未登录状态下不可发表评论,显示以下链接-->
|
||||
<span class="fr black9" style="display:none; ">请先 <a class="orange" href="/user/login.html">登录</a><em class="ml10 mr10">|</em><a class="orange" href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text" placeholder="我来说两句..."></textarea>
|
||||
<div class="reply_btn">
|
||||
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
|
||||
<span class="fr"><a class="btn_ora" href="javascript:void(0);" onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--left end-->
|
||||
|
||||
<!--right start-->
|
||||
<div class="wrap_right fr">
|
||||
|
||||
|
||||
|
||||
<div class="wrap_inner author_info mb20">
|
||||
|
||||
<div class="author_head cf">
|
||||
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
|
||||
id="authorLogoImg"/></a>
|
||||
<div class="msg">
|
||||
<span class="icon_qyzz">签约作家</span>
|
||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:text="${book.authorName}"></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author_intro cf">
|
||||
<h4>作者有话说</h4>
|
||||
<div class="intro_txt" id="authorNote">
|
||||
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
|
||||
</div>
|
||||
</div>
|
||||
<!--如果作者没有其他作品就下方代码整个不显示-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--作者专栏e-->
|
||||
<script type="text/javascript">
|
||||
var authorUId=8;
|
||||
if(authorUId==0)
|
||||
{$("#authorPanel").hide();}
|
||||
else
|
||||
{
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!--right end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$('#txtComment').on('input propertychange', function () {
|
||||
var count = $(this).val().length;
|
||||
$('#emCommentNum').html(count + "/1000");
|
||||
if (count > 1000) {
|
||||
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
|
||||
}
|
||||
});
|
||||
searchComments(1, 20);
|
||||
|
||||
function searchComments(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/listCommentByPage",
|
||||
data: {'bookId': $("#bookId").val(),'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#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=\"\">" +
|
||||
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</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>");
|
||||
}
|
||||
$("#commentPanel").html(commentListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'commentPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
searchComments(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
401
templates/green/html/book/book_content.html
Normal file
401
templates/green/html/book/book_content.html
Normal file
@ -0,0 +1,401 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+${application.website.name}"></title>
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'"/>
|
||||
<link rel="stylesheet" href="/css/read.css"/>
|
||||
<link href="/css/book.css" rel="stylesheet"/>
|
||||
|
||||
</head>
|
||||
<link href="/layui/css/layui.css" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
.screen_toolbar {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
text-align: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
BookDetail.SetReadFontFamilyClear(0);
|
||||
var font = localStorage.getItem("fonts");
|
||||
var colorNum = localStorage.getItem("colorNum");
|
||||
var fontNum = localStorage.getItem("fontNum");
|
||||
|
||||
|
||||
</script>
|
||||
<body class="read_style_1" oncontextmenu="return false" onselectstart="return false"
|
||||
ondragstart="return false" onbeforecopy="return false" oncopy="document.selection.empty()"
|
||||
onselect="document.selection.empty()">
|
||||
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
<input type="hidden" id="bookName" th:value="${book.bookName}"/>
|
||||
<input type="hidden" id="preIndexName" th:value="${bookIndex.indexName}"/>
|
||||
|
||||
<input type="hidden" id="preContentId" th:value="${bookIndex.id}"/>
|
||||
<input type="hidden" id="preIndexId" th:value="${preBookIndexId}"/>
|
||||
<input type="hidden" id="nextIndexId" th:value="${nextBookIndexId}"/>
|
||||
<input type="hidden" id="logo" th:value="${application.website.logo}"/>
|
||||
<input type="hidden" id="logoDark" th:value="${application.website.logoDark}"/>
|
||||
|
||||
<div th:replace="common/top :: top('10')">
|
||||
</div>
|
||||
|
||||
<div id="showDetail">
|
||||
|
||||
<div class="readBody cf">
|
||||
<div class="readMain cf">
|
||||
<div class="read_menu">
|
||||
<div class="menu_left" style="">
|
||||
<ul>
|
||||
<li><a class="ico_catalog" th:href="'/book/indexList-'+${book.id}+'.html'" title="目录">
|
||||
<b>目录</b></a></li>
|
||||
<li><a class="ico_page" th:href="'/book/'+${book.id}+'.html'" title="返回书页"><b>书页</b></a></li>
|
||||
<li class="li_shelf" id="cFavs"><a class="ico_shelf" href="javascript:void(0);" title="加入书架"
|
||||
onclick="javascript:BookDetail.AddFavorites(37,1959973,1);"><b>加书架</b></a>
|
||||
</li>
|
||||
<li class="li_shelfed" style="display: none;"><a class="ico_shelfed" href="javascript:void(0);"
|
||||
title="已收藏"><b>已收藏</b></a></li>
|
||||
|
||||
<li><a class="ico_comment" th:href="'/book/comment-'+${book.id}+'.html'" title="评论">
|
||||
<b>评论</b></a></li>
|
||||
<li><a class="ico_setup" href="javascript:void(0);" title="设置"><b>设置</b></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu_right" style="position: fixed; bottom: 0">
|
||||
<ul>
|
||||
<li><a class="ico_pagePrev"
|
||||
th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'"
|
||||
title="上一章"><i>上一章</i></a></li>
|
||||
<li><a class="ico_pageNext"
|
||||
th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'"
|
||||
title="下一章"><i>下一章</i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readWrap">
|
||||
<div class="bookNav">
|
||||
<a href="/">首页 </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 id="readcontent">
|
||||
<div class="textbox cf">
|
||||
|
||||
<div class="book_title">
|
||||
<h1 th:utext="${bookIndex.indexName}">
|
||||
</h1>
|
||||
<div class="textinfo">
|
||||
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
|
||||
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:utext="${book.authorName}"></a><span
|
||||
th:text="'字数:'+${bookIndex.wordCount}"></span><span
|
||||
th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="txtwrap" th:if="${needBuy}">
|
||||
<div id="showReading" class="readBox" style="font-size: 16px; font-family: microsoft yahei">
|
||||
<p>
|
||||
|
||||
</p>
|
||||
|
||||
<div class="pc_bar" style="display: none;">
|
||||
<a href="javascript:void(0);" class="icon_pc"
|
||||
onclick="javascript:uFans.startSupportRead();">
|
||||
<span><i class="icon_yb"></i><em>捧场</em></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="showBooking" class="orderBox">
|
||||
<h3>此章为VIP章节,需要订阅后才能继续阅读</h3>
|
||||
<form method="post" action="./2052117.html?bid=302&cid=2052117" id="Form1">
|
||||
<ul class="order_list">
|
||||
<li>价格:<span class="red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span>
|
||||
</li>
|
||||
<li id="panelPay" class="btns"><a class="btn_red"
|
||||
href="javascript:buyBookIndex()">购买</a></li>
|
||||
|
||||
</ul>
|
||||
<input type="hidden" name="HidCId" id="HidCId" value="2052117">
|
||||
<input type="hidden" name="HidBId" id="HidBId" value="302">
|
||||
<input type="hidden" name="HidCRank" id="HidCRank" value="49">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="txtwrap" th:if="${!needBuy}">
|
||||
<div id="showReading" class="readBox" style="font-size: 16px; font-family: microsoft yahei"
|
||||
th:utext="${bookContent.content}">
|
||||
|
||||
|
||||
<div class="pc_bar" style="display: none;">
|
||||
<a href="javascript:void(0);" class="icon_pc"
|
||||
onclick="javascript:uFans.startSupportRead();">
|
||||
<span><i class="icon_yb"></i><em>捧场</em></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="nextPageBox">
|
||||
<a class="prev"
|
||||
th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
|
||||
<a class="dir" th:href="'/book/indexList-'+${book.id}+'.html'"
|
||||
>目录</a> <a class="next"
|
||||
th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readPopup qrBox" style="display: none">
|
||||
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.qrBox').hide();"></a>
|
||||
<div class="popupTit">
|
||||
<h3>手机阅读</h3>
|
||||
</div>
|
||||
<div class="qrList">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readPopup setupBox" style="display: none;">
|
||||
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.setupBox').hide();"></a>
|
||||
<div class="popupTit">
|
||||
<h3>设置</h3>
|
||||
</div>
|
||||
<div class="setupList">
|
||||
<ul>
|
||||
<li class="readTheme">
|
||||
<em class="tit">阅读主题:</em>
|
||||
<a id="setup_color_white" class="white current"
|
||||
href="javascript:void(0);" title="白色" onclick="javascript:BookDetail.SetBackUpColor(1);"></a><a
|
||||
id="setup_color_green" class="green" href="javascript:void(0);" title="绿色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(2);"></a><a id="setup_color_pink" class="pink"
|
||||
href="javascript:void(0);" title="粉色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(3);"></a><a
|
||||
id="setup_color_yellow" class="yellow" href="javascript:void(0);" title="黄色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(4);"></a><a id="setup_color_gray" class="gray"
|
||||
href="javascript:void(0);" title="灰色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(5);"></a><a
|
||||
id="setup_color_night" class="night" href="javascript:void(0);" title="夜间"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(6);"></a></li>
|
||||
<li class="setFont setBtn"><em class="tit">正文字体:</em> <a id="setup_font_yahei" class="setYahei current"
|
||||
href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFontFamily(0);">雅黑</a>
|
||||
<a id="setup_font_simsun" class="setSimsun" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFontFamily(1);">宋体</a> <a id="setup_font_ks" class="setKs"
|
||||
href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFontFamily(2);">楷书</a>
|
||||
</li>
|
||||
<li class="fontSize setBtn"><em class="tit">字体大小:</em> <a class="small" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFont(-2);">A-</a><span
|
||||
class="current_font"
|
||||
id="cFonts">
|
||||
16</span><a class="big" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFont(2);">A+</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maskBox" style="display: none">
|
||||
</div>
|
||||
<div id="showError">
|
||||
<span id="LabErrorStatus"></span>
|
||||
</div>
|
||||
|
||||
<div class="maskBox" style="display: none" onclick="javascript:uFans.closeBox();"></div>
|
||||
<div class="readPopup pcBox" style="display: none" id="showPC"></div>
|
||||
<div class="readPopup flowerBox" style="display: none" id="showFlower"></div>
|
||||
<div class="readPopup newsTipBox" style="display: none;" id="showNote"></div>
|
||||
|
||||
<!--
|
||||
<div id="screenInput" class="screen_toolbar" >
|
||||
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md4 layui-col-lg4"></div>
|
||||
<div class="layui-col-xs6 layui-col-sm4 layui-col-md4 layui-col-lg4">
|
||||
<input type="text" id="screenBulletText" required lay-verify="required" placeholder="请输入弹幕内容,右下角开关可控制弹幕是否开启" autocomplete="off"
|
||||
class="layui-input">
|
||||
|
||||
</div>
|
||||
<div class="layui-col-xs2 layui-col-sm1 layui-col-md1 layui-col-lg1">
|
||||
<button class="layui-btn layui-btn-danger send">发送</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="screenSwitch" class="layui-form">
|
||||
<div class="layui-form-item" style="position: fixed;right: 0px;bottom: 100px" title="弹幕开关">
|
||||
<!– <label class="layui-form-label" style="opacity:0.5;font-weight: bold;color: red;">弹幕</label>–>
|
||||
<div class="layui-input-block">
|
||||
<input class="clear" type="checkbox" name="switch" lay-skin="switch">
|
||||
</div>
|
||||
</div>
|
||||
</form>-->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
var logo = $("#logo").val();
|
||||
var logoDark = $("#logoDark").val();
|
||||
if (font) {
|
||||
$(".readBox").css("font-size", font + "px");
|
||||
$("#cFonts").html(font);
|
||||
$("#ChapterBody").attr("class", "article-content font" + font);
|
||||
BookDetail.reShowCover();
|
||||
}
|
||||
if (fontNum) {
|
||||
BookDetail.SetReadFontFamily(fontNum);
|
||||
}
|
||||
if (colorNum) {
|
||||
BookDetail.SetBackUpColor(colorNum);
|
||||
if (colorNum == 6) {
|
||||
$(".logo img").attr("src", logoDark);
|
||||
}
|
||||
}
|
||||
//查询是否在书架
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId': $("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data) {
|
||||
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
|
||||
}
|
||||
//添加阅读记录
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/addReadHistory",
|
||||
data: {'bookId': $("#bookId").val(), 'preContentId': $("#preContentId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
},
|
||||
error: function () {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
var bookId = $("#bookId").val();
|
||||
var indexId = $("#preContentId").val();
|
||||
var preIndexId = $("#preIndexId").val();
|
||||
var nextIndexId = $("#nextIndexId").val();
|
||||
$(function () {
|
||||
BookDetail.GetReadSet(bookId, indexId, preIndexId, nextIndexId, 1);
|
||||
$(".ico_setup").click(function () {
|
||||
|
||||
$(".maskBox,.setupBox").show();
|
||||
});
|
||||
$(".ico_phone").click(function () {
|
||||
$(".maskBox,.qrBox").show();
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
var vtop = $(document).scrollTop();
|
||||
var vbottom = $(document).height() - vtop - $(window).height();
|
||||
if (vtop > 50) {
|
||||
$(".menu_left").css("position", "fixed");
|
||||
$(".menu_left").css("top", "2px");
|
||||
} else {
|
||||
$(".menu_left").css("position", "absolute");
|
||||
$(".menu_left").css("top", "60px")
|
||||
}
|
||||
|
||||
if (vbottom < 150) {
|
||||
$(".menu_right").css("position", "absolute");
|
||||
$(".menu_right").css("bottom", "150px");
|
||||
} else {
|
||||
$(".menu_right").css("position", "fixed");
|
||||
$(".menu_right").css("bottom", "2px");
|
||||
}
|
||||
});
|
||||
|
||||
var bgClass = '1';
|
||||
if (bgClass == 6) {
|
||||
$(".logo img").attr("src", logoDark);
|
||||
}
|
||||
$(".readTheme a").click(function () {
|
||||
$(".logo img").attr("src", logo);
|
||||
})
|
||||
$("#setup_color_night").click(function () {
|
||||
$(".logo img").attr("src", logoDark);
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function enterPreIndexPage(bookId, bookIndexId) {
|
||||
if (bookIndexId != 0) {
|
||||
window.location.href = '/book/' + bookId + '/' + bookIndexId + ".html";
|
||||
} else {
|
||||
window.location.href = '/book/indexList-' + bookId + '.html';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function enterNextIndexPage(bookId, bookIndexId) {
|
||||
if (bookIndexId != 0) {
|
||||
window.location.href = '/book/' + bookId + '/' + bookIndexId + ".html";
|
||||
} else {
|
||||
window.location.href = '/book/indexList-' + bookId + '.html';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function buyBookIndex() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/buyBookIndex",
|
||||
data: {
|
||||
'bookId': $("#bookId").val(), "bookName": $("#bookName").val(),
|
||||
"bookIndexId": $("#preContentId").val(), "bookIndexName": $("#preIndexName").val()
|
||||
},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
location.reload();
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
$.post("/book/addVisitCount", {"bookId": $("#bookId").val()}, function () {
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
353
templates/green/html/book/book_detail.html
Normal file
353
templates/green/html/book/book_detail.html
Normal file
@ -0,0 +1,353 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+${application.website.name}"></title>
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${book.bookName}+'由作家'+${book.authorName}+'创作,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
<link href="/css/book.css?v=2019" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="hidden" id="lastBookIndexId" th:value="${book.lastIndexId}"/>
|
||||
<input type="hidden" id="bookCatId" th:value="${book.catId}"/>
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
<input type="hidden" id="preContentId" th:value="${firstBookIndexId}"/>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<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
|
||||
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>
|
||||
<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>
|
||||
</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">总点击:<em id="cTotal" th:text="${book.visitCount}"></em></span>
|
||||
<span class="item">总字数:<em th:text="${book.wordCount}"></em></span></li>
|
||||
</ul>
|
||||
<div class="intro_txt">
|
||||
<p th:utext="${book.bookDesc}"></p>
|
||||
<a class="icon_hide" href="javascript:void(0)" onclick=""><i></i>收起</a>
|
||||
<a class="icon_show" href="javascript:void(0)" onclick=""><i></i>展开</a>
|
||||
</div>
|
||||
<div class="btns" id="optBtn">
|
||||
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" class="btn_ora">点击阅读</a>
|
||||
<span id="cFavs"><a href="javascript:void(0);" class="btn_ora_white btn_addsj"
|
||||
onclick="javascript:BookDetail.AddFavorites(37,0,0);">加入书架</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="channelBookContent cf">
|
||||
<!--left start-->
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
|
||||
<!--章节目录 start-->
|
||||
<div class="pad20_nobt">
|
||||
<div class="bookChapter">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>最新章节</h3><span id="bookIndexCount">(0章)</span></div>
|
||||
<a class="fr" th:href="'/book/indexList-'+${book.id}+'.html'">全部目录</a>
|
||||
</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="black9 fr"
|
||||
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</li>
|
||||
<li class="zj_yl" id="lastBookContent"> </li>
|
||||
<!--此处是该章节预览,截取最前面的42个字-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--章节目录 end-->
|
||||
|
||||
<!--作品评论区 start-->
|
||||
<div class="pad20">
|
||||
<div class="bookComment">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<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'" >
|
||||
<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>
|
||||
|
||||
<!--无评论时此处隐藏-->
|
||||
<div class="more_bar" id="moreCommentPanel" th:style="${bookCommentPageBean.total == 0}? 'display:none'">
|
||||
<a th:href="'/book/comment-'+${book.id}+'.html'">查看全部评论></a>
|
||||
</div>
|
||||
|
||||
<div class="reply_bar" id="reply_bar">
|
||||
<div class="tit">
|
||||
<span class="fl font16">发表评论</span>
|
||||
<!--未登录状态下不可发表评论,显示以下链接-->
|
||||
<span class="fr black9" style="display:none; ">请先 <a class="orange"
|
||||
href="/user/login.html">登录</a><em
|
||||
class="ml10 mr10">|</em><a class="orange"
|
||||
href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text"
|
||||
placeholder="我来说两句..."></textarea>
|
||||
<div class="reply_btn">
|
||||
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
|
||||
<span class="fr"><a class="btn_ora" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--作品评论区 end-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--left end-->
|
||||
|
||||
<!--right start-->
|
||||
<div class="wrap_right fr">
|
||||
|
||||
|
||||
<script src="/javascript/authorinfo.js?uid=8" type="text/javascript"></script>
|
||||
<!--作者专栏s-->
|
||||
<div class="wrap_inner author_info mb20">
|
||||
|
||||
<div class="author_head cf">
|
||||
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
|
||||
id="authorLogoImg"/></a>
|
||||
<div class="msg">
|
||||
<span class="icon_qyzz">签约作家</span>
|
||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:utext="${book.authorName}"></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author_intro cf">
|
||||
<h4>作者有话说</h4>
|
||||
<div class="intro_txt" id="authorNote">
|
||||
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
|
||||
</div>
|
||||
</div>
|
||||
<!--如果作者没有其他作品就下方代码整个不显示-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--作者专栏e-->
|
||||
<script type="text/javascript">
|
||||
var authorUId = 8;
|
||||
if (authorUId == 0) {
|
||||
$("#authorPanel").hide();
|
||||
} else {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="RelateBookOther" class="wrap_inner wrap_right_cont mb20">
|
||||
<div class="title cf">
|
||||
<h3 class="on">同类推荐</h3>
|
||||
</div>
|
||||
<div class="tj_bar">
|
||||
<ul id="recBookList">
|
||||
<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>
|
||||
</div>
|
||||
<div class="dec">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--right end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js?v=1.1" type="text/javascript"></script>
|
||||
<script src="/javascript/ufans.js?v=1" type="text/javascript"></script>
|
||||
|
||||
|
||||
<div class="maskBox" style="display:none" onclick="javascript:uFans.closeBox();"></div>
|
||||
<div class="readPopup pcBox" style="display:none" id="showPC"></div>
|
||||
<div class="readPopup flowerBox" style="display:none" id="showFlower"></div>
|
||||
<div class="readPopup newsTipBox" style="display:none;" id="showNote"></div>
|
||||
<script type="text/javascript">
|
||||
var pathname = window.location.pathname;
|
||||
var bookId = pathname.substring(pathname.lastIndexOf("/") + 1, pathname.lastIndexOf("."))
|
||||
//查询章节信息
|
||||
var lastBookIndexId = $("#lastBookIndexId").val();
|
||||
if(lastBookIndexId){
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/queryBookIndexAbout",
|
||||
data: {'bookId': bookId, 'lastBookIndexId': lastBookIndexId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookIndexData = data.data;
|
||||
$("#bookIndexCount").html("(" + bookIndexData.bookIndexCount + "章)");
|
||||
$("#lastBookContent").html(bookIndexData.lastBookContent + "...");
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}else{
|
||||
$("#optBtn").remove();
|
||||
}
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//查询是否在书架
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId': $("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data) {
|
||||
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var currentBId = 37, spmymoney = 0;
|
||||
var relationStep = 0;
|
||||
var authorUId = 8;
|
||||
$(function () {
|
||||
$(".icon_show").click(function () {
|
||||
$(this).hide();
|
||||
$(".icon_hide").show();
|
||||
$(".intro_txt").innerHeight("auto");
|
||||
});
|
||||
$(".icon_hide").click(function () {
|
||||
$(this).hide();
|
||||
$(".icon_show").show();
|
||||
$(".intro_txt").innerHeight("");
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#AuthorOtherNovel li").unbind("mouseover");
|
||||
|
||||
$('#txtComment').on('input propertychange', function () {
|
||||
var count = $(this).val().length;
|
||||
$('#emCommentNum').html(count + "/1000");
|
||||
if (count > 1000) {
|
||||
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
||||
$.post("/book/addVisitCount", {"bookId": bookId}, function () {
|
||||
});
|
||||
|
||||
|
||||
function loadCommentList(){
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/listCommentByPage",
|
||||
data: {'bookId': $("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#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=\"\">" +
|
||||
"<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+
|
||||
"</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>");
|
||||
}
|
||||
$("#commentPanel").html(commentListHtml);
|
||||
$("#noCommentPanel").hide();
|
||||
$("#commentPanel").show();
|
||||
$("#moreCommentPanel").show();
|
||||
|
||||
} else {
|
||||
$("#commentPanel").hide();
|
||||
$("#moreCommentPanel").hide();
|
||||
$("#noCommentPanel").show();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
66
templates/green/html/book/book_index.html
Normal file
66
templates/green/html/book/book_index.html
Normal file
@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+${application.website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
<link rel="stylesheet" href="/css/book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<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
|
||||
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>><a
|
||||
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
|
||||
</div>
|
||||
<div class="channelWrap channelChapterlist cf mb50">
|
||||
|
||||
<div class="bookMain">
|
||||
<div class="bookCover cf">
|
||||
<div class="book_info1">
|
||||
<div class="tit">
|
||||
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<span>作者:<a href="javascript:void(0)" th:utext="${book.authorName}"></a></span>
|
||||
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
|
||||
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
|
||||
th:case="*">已完结</em></span>
|
||||
<span>总点击:<em class="black3" id="cTotal" th:text="${book.visitCount}"></em></span>
|
||||
<span>总字数:<em class="black3" th:text="${book.wordCount}"></em></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dirWrap cf">
|
||||
<h3 th:text="'正文('+${bookIndexCount}+')'"></h3>
|
||||
<div class="dirList">
|
||||
<ul th:each="bookIndex : ${bookIndexList}">
|
||||
<li><a th:if="${bookIndex.isVip} != '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" >
|
||||
<span th:utext="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
|
||||
</a>
|
||||
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:utext="${bookIndex.indexName}">
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
150
templates/green/html/book/book_ranking.html
Normal file
150
templates/green/html/book/book_ranking.html
Normal file
@ -0,0 +1,150 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:text="'小说排行榜_'+${application.website.name}"></title>
|
||||
<meta name="keywords" content="小说排行榜,热门小说榜,小说排行榜完结版,完结小说排行榜,完本小说排行榜,最新小说排行榜,网络小说排行榜,排行榜,点击榜,新书榜,推荐榜" />
|
||||
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+${application.website.name}+'。'" />
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link rel="stylesheet" href="/css/book.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('2')">
|
||||
</div>
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="channelRankingContent cf">
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
<!--榜单详情 start-->
|
||||
<div class="pad20">
|
||||
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3 class="font26 mt5 mb5" id="rankName">点击榜</h3>
|
||||
</div>
|
||||
<a class="fr"></a>
|
||||
</div>
|
||||
<div class="updateTable rankTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank">排名</th>
|
||||
<th class="style">类别</th>
|
||||
<th class="name">书名</th>
|
||||
<th class="chapter">最新章节</th>
|
||||
<th class="author">作者</th>
|
||||
<th class="word">字数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookRankList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--榜单详情 end-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrap_right fr">
|
||||
<div class="wrap_inner wrap_right_cont mb20">
|
||||
<div class="title cf noborder">
|
||||
<h3 class="on">排行榜</h3>
|
||||
</div>
|
||||
<div class="rightList2">
|
||||
<ul id="rankType">
|
||||
<li><a class="on" href="javascript:listRank(0)">点击榜</a></li>
|
||||
<li><a href="javascript:listRank(1)">新书榜</a></li>
|
||||
<li><a href="javascript:listRank(2)">更新榜</a></li>
|
||||
<li><a href="javascript:listRank(3)">评论榜</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#rankType a").click(function () {
|
||||
$("#rankType .on").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
})
|
||||
|
||||
var rankType = getSearchString("type");
|
||||
if(rankType==undefined){
|
||||
rankType=0;
|
||||
}else{
|
||||
$("#rankType a").eq(rankType).click();
|
||||
}
|
||||
listRank(rankType);
|
||||
|
||||
function listRank(rankType){
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/listRank",
|
||||
data: {'type':rankType,'limit':30},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookRankList = data.data;
|
||||
var bookRankListHtml = "";
|
||||
for(var i=0;i<bookRankList.length;i++){
|
||||
var book = bookRankList[i];
|
||||
var classHtml = "";
|
||||
if(i<3){
|
||||
classHtml="num"+(i+1);
|
||||
}
|
||||
bookRankListHtml+=("<tr>\n" +
|
||||
" <td class=\"rank\"><i class=\""+classHtml+"\">"+(i+1)+"</i></td>\n" +
|
||||
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a></td>\n" +
|
||||
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >"+book.bookName+"</a></td>\n" +
|
||||
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >"+book.lastIndexName+"</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"author\"><a href=\"javascript:void(0)\">"+book.authorName+"</a></td>\n" +
|
||||
" <td class=\"word\">"+(book.wordCount / 10000).toFixed(2)+"万</td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookRankList").html(bookRankListHtml);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
switch (rankType) {
|
||||
case 0 : {
|
||||
$("#rankName").html("点击榜");
|
||||
break;
|
||||
}
|
||||
case 1 : {
|
||||
$("#rankName").html("新书榜");
|
||||
break;
|
||||
}
|
||||
case 2 : {
|
||||
$("#rankName").html("更新榜");
|
||||
break;
|
||||
}
|
||||
case 3 : {
|
||||
$("#rankName").html("评论榜");
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
364
templates/green/html/book/bookclass.html
Normal file
364
templates/green/html/book/bookclass.html
Normal file
@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:text="'全部作品_'+${application.website.name}"></title>
|
||||
<meta name="keywords" th:content="${application.website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'。'"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('1')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="channelWrap classTable cf">
|
||||
<div class="so_tag">
|
||||
<ul class="list">
|
||||
<li class="so_pd" id="workDirection">
|
||||
<span class="tit">作品频道:</span>
|
||||
<a filter-value="0" href="javascript:listBookCategory();search(1,20)" class="on">男频</a>
|
||||
<a filter-value="1" href="javascript:listBookCategory();search(1,20)">女频</a>
|
||||
</li>
|
||||
<li id="idGirl" class="so_class">
|
||||
<span class="tit">作品分类:</span>
|
||||
<span class="so_girl" id="girlCategoryList" style="display: none;">
|
||||
</span>
|
||||
<span class="so_boy" id="boyCategoryList">
|
||||
</span>
|
||||
</li>
|
||||
<!-- <li class="so_free">
|
||||
<span class="tit">是否免费:</span>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=0&so=0&ms=2" class="on">不限</a>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=1&so=0&ms=2" class="">免费作品</a>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=2&so=0&ms=2" class="">收费作品</a>
|
||||
</li>-->
|
||||
<li class="so_progress">
|
||||
<span class="tit">是否完结:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="0" href="javascript:search(1,20)" class="">连载中</a>
|
||||
<a filter-value="1" href="javascript:search(1,20)" class="">已完结</a>
|
||||
</li>
|
||||
<li class="so_words">
|
||||
<span class="tit">作品字数:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value-max="300000" href="javascript:search(1,20)" class="">30万字以下</a>
|
||||
<a filter-value-min="300000" filter-value-max="500000" href="javascript:search(1,20)" class="">30-50万字</a>
|
||||
<a filter-value-min="500000" filter-value-max="1000000" href="javascript:search(1,20)" class="">50-100万字</a>
|
||||
<a filter-value-min="1000000" href="javascript:search(1,20)" class="">100万字以上</a>
|
||||
</li>
|
||||
<li class="so_update">
|
||||
<span class="tit">更新时间:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="3" href="javascript:search(1,20)" class="">三日内</a>
|
||||
<a filter-value="7" href="javascript:search(1,20)" class="">七日内</a>
|
||||
<a filter-value="15" href="javascript:search(1,20)" class="">半月内</a>
|
||||
<a filter-value="30" href="javascript:search(1,20)" class="">一月内</a>
|
||||
</li>
|
||||
<li class="so_sort">
|
||||
<span class="tit">排序方式:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="last_index_update_time" href="javascript:search(1,20)" class="">更新时间</a>
|
||||
<a filter-value="word_count" href="javascript:search(1,20)" class="">总字数</a>
|
||||
<a filter-value="visit_count" href="javascript:search(1,20)" class="">点击量</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="channelWrap channelClassContent cf">
|
||||
<div class="updateTable rankTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank">序号</th>
|
||||
<th class="style">类别</th>
|
||||
<th class="name">书名</th>
|
||||
<th class="chapter">最新章节</th>
|
||||
<th class="author">作者</th>
|
||||
<th class="word">字数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pageBox cf" id="books">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookclass.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var workDirection;
|
||||
var catId = getSearchString('c');
|
||||
|
||||
listBookCategory(catId);
|
||||
|
||||
if(!catId){
|
||||
search(1, 20);
|
||||
}
|
||||
|
||||
function search(curr, limit) {
|
||||
var searchData = {};
|
||||
searchData.curr = curr;
|
||||
searchData.limit = limit;
|
||||
|
||||
searchData.keyword = $("#searchKey").val();
|
||||
var workDirection = $(".so_pd>.on").attr("filter-value");
|
||||
if(workDirection != undefined){
|
||||
searchData.workDirection = workDirection;
|
||||
}
|
||||
|
||||
if(workDirection == 1){
|
||||
var catId = $(".so_girl>.on").attr("filter-value");
|
||||
}else{
|
||||
var catId = $(".so_boy>.on").attr("filter-value");
|
||||
}
|
||||
|
||||
if(catId != undefined){
|
||||
searchData.catId = catId;
|
||||
}
|
||||
|
||||
var bookStatus = $(".so_progress>.on").attr("filter-value");
|
||||
if(bookStatus != undefined){
|
||||
searchData.bookStatus = bookStatus;
|
||||
}
|
||||
|
||||
var wordCountMin = $(".so_words>.on").attr("filter-value-min");
|
||||
if(wordCountMin != undefined){
|
||||
searchData.wordCountMin = wordCountMin;
|
||||
}
|
||||
|
||||
var wordCountMax = $(".so_words>.on").attr("filter-value-max");
|
||||
if(wordCountMax != undefined){
|
||||
searchData.wordCountMax = wordCountMax;
|
||||
}
|
||||
|
||||
var updatePeriod = $(".so_update>.on").attr("filter-value");
|
||||
if(updatePeriod != undefined){
|
||||
searchData.updatePeriod = updatePeriod;
|
||||
}
|
||||
|
||||
var sort = $(".so_sort>.on").attr("filter-value");
|
||||
if(sort != undefined){
|
||||
searchData.sort = sort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/searchByPage",
|
||||
data: searchData,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
var bookListHtml = "";
|
||||
for (var i = 0; i < bookList.length; i++) {
|
||||
var book = bookList[i];
|
||||
var wordCount = (book.wordCount / 10000).toFixed(2);
|
||||
bookListHtml += (" <tr>\n" +
|
||||
" <td class=\"rank\"><i>" + (i + 1) + "</i></td>\n" +
|
||||
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" cls=\"13\">[" + book.catName + "]</a></td>\n" +
|
||||
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >" + book.bookName + "</a></td>\n" +
|
||||
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >" + book.lastIndexName + "</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"author\"><a href=\"javascript:void(0)\">" + book.authorName + "</a></td>\n" +
|
||||
" <td class=\"word\">" + wordCount + "万</td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'books' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
function listBookCategory(c) {
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/listBookCategory",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var categoryList = data.data;
|
||||
var boyCategoryListHtml = "";
|
||||
boyCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
|
||||
var girlCategoryListHtml = "";
|
||||
girlCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
|
||||
for (var i = 0; i < categoryList.length; i++) {
|
||||
var category = categoryList[i];
|
||||
if (category.workDirection == 1) {
|
||||
if(category.id==c){
|
||||
workDirection = 1;
|
||||
}
|
||||
girlCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
|
||||
} else {
|
||||
if(category.id==c){
|
||||
workDirection = 0;
|
||||
}
|
||||
boyCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
|
||||
}
|
||||
}
|
||||
$("#boyCategoryList").html(boyCategoryListHtml);
|
||||
$("#girlCategoryList").html(girlCategoryListHtml);
|
||||
$(".so_girl a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_girl>.on").removeClass("on");
|
||||
$(".so_girl a").eq(index).addClass("on");
|
||||
})
|
||||
$(".so_boy a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_boy>.on").removeClass("on");
|
||||
$(".so_boy>.on").removeClass("on");
|
||||
$(".so_boy a").eq(index).addClass("on");
|
||||
})
|
||||
if(c) {
|
||||
if (workDirection === 1) {
|
||||
$(".so_pd a").eq(1).click();
|
||||
$("#girlCategoryList a[filter-value=" + c + "]").click();
|
||||
} else {
|
||||
$("#boyCategoryList a[filter-value=" + c + "]").click();
|
||||
}
|
||||
search(1, 20);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function () {
|
||||
$(".so_pd a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_pd>.on").removeClass("on");
|
||||
if (index == 2) {
|
||||
$(".so_pd a").eq(1).addClass("on");
|
||||
$(".so_girl").show();
|
||||
$(".so_boy").hide();
|
||||
} else {
|
||||
$(".so_pd a").eq(0).addClass("on");
|
||||
$(".so_girl").hide();
|
||||
$(".so_boy").show();
|
||||
}
|
||||
})
|
||||
$(".so_progress a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_progress>.on").removeClass("on");
|
||||
$(".so_progress>.on").removeClass("on");
|
||||
$(".so_progress a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_words a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_words>.on").removeClass("on");
|
||||
$(".so_words>.on").removeClass("on");
|
||||
$(".so_words a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_update a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_update>.on").removeClass("on");
|
||||
$(".so_update>.on").removeClass("on");
|
||||
$(".so_update a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_sort a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_sort>.on").removeClass("on");
|
||||
$(".so_sort>.on").removeClass("on");
|
||||
$(".so_sort a").eq(index-1).addClass("on");
|
||||
})
|
||||
|
||||
|
||||
$(".style a").each(function () {
|
||||
var bId = $(this).attr("cls");
|
||||
if (bId > 0) {
|
||||
$(this).html("[" + getBName(bId) + "]");
|
||||
}
|
||||
});
|
||||
|
||||
if (2 == 1) {
|
||||
$(".so_pd>.on").removeClass("on");
|
||||
$(".so_pd a").eq(1).addClass("on");
|
||||
$(".so_girl").hide();
|
||||
$(".so_boy").show();
|
||||
}
|
||||
});
|
||||
|
||||
function getBName(bId) {
|
||||
for (var i = 0; i < bClass.rows.length; i++) {
|
||||
if (bId == bClass.rows[i].BId) {
|
||||
return bClass.rows[i].Name;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user