mirror of
https://github.com/201206030/novel-plus.git
synced 2025-04-27 01:30:51 +00:00
325 lines
14 KiB
Java
325 lines
14 KiB
Java
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
|
||
<meta charset="utf-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||
|
||
|
||
<title th:text="${application.website.name}"></title>
|
||
|
||
<meta name="keywords" th:content="${application.website.keyword}"/>
|
||
<meta name="description"
|
||
th:content="${application.website.description}"/>
|
||
|
||
|
||
<div th:include="mobile/common/css :: css"></div>
|
||
|
||
<style>
|
||
|
||
.line-limit-length {
|
||
|
||
overflow: hidden;
|
||
|
||
text-overflow: ellipsis;
|
||
|
||
white-space: nowrap;
|
||
|
||
}
|
||
|
||
.layui-nav .layui-nav-item {
|
||
position: relative;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
line-height: 50px;
|
||
}
|
||
|
||
body ul.layui-nav li.layui-nav-item a {
|
||
display: block;
|
||
transition: all .3s;
|
||
-webkit-transition: all .3s;
|
||
}
|
||
|
||
.user_link {
|
||
position: relative;
|
||
display: inline-block;
|
||
vertical-align: middle;
|
||
line-height: 50px;
|
||
padding: 0 5px;
|
||
color: #fff;
|
||
float: right;
|
||
}
|
||
|
||
.user_link a {
|
||
|
||
color: #fff;
|
||
}
|
||
|
||
</style>
|
||
|
||
|
||
</head>
|
||
<body>
|
||
|
||
|
||
<!-- 你的HTML代码 -->
|
||
<a name="top"></a>
|
||
<ul class="layui-nav app" lay-filter="" style="display:none;padding:0 10px;text-align: center">
|
||
<li class="layui-nav-item"><a>分类</a>
|
||
<dl class="layui-nav-child">
|
||
<dd><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></dd>
|
||
</dl>
|
||
</li>
|
||
<li class="layui-nav-item"><a>全本</a>
|
||
<dl class="layui-nav-child">
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
|
||
</dl>
|
||
</li>
|
||
<li class="layui-nav-item"><a>排行</a>
|
||
<dl class="layui-nav-child">
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
|
||
</dl>
|
||
</li>
|
||
<li class="user_link"></li>
|
||
|
||
</ul>
|
||
<ul class="layui-nav pc" lay-filter="" style="padding:0 36px;text-align: center">
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=1&sort=last_index_update_time">玄幻小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=2&sort=last_index_update_time">修真小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=3&sort=last_index_update_time">都市小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=4&sort=last_index_update_time">历史小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=6&sort=last_index_update_time">网游小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=5&sort=last_index_update_time">科幻小说</a></li>
|
||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=7&sort=last_index_update_time">女频小说</a></li>
|
||
<li class="layui-nav-item"><a>完本小说</a>
|
||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1">全部小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=1">玄幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=2">修真小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=3">都市小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=4">历史小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=6">网游小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=5">科幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?bookStatus=1&catId=7">女频小说</a></dd>
|
||
</dl>
|
||
</li>
|
||
<li class="layui-nav-item"><a>小说排行</a>
|
||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count">全部小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=1">玄幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=2">修真小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=3">都市小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=4">历史小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=6">网游小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=5">科幻小说</a></dd>
|
||
<dd><a href="/book/book_ranking.html?sortBy=visit_count&catId=7">女频小说</a></dd>
|
||
</dl>
|
||
</li>
|
||
<li class="user_link"></li>
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
<div class="layui-container">
|
||
<div class="layui-row">
|
||
|
||
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
|
||
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
|
||
autocomplete="off"
|
||
class="layui-input">
|
||
</div>
|
||
<div class="layui-col-xs1" style="padding: 1%">
|
||
<button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
<div style="height: 1px" class="layui-col-lg1"></div>
|
||
<div class="layui-collapse layui-col-lg10">
|
||
<div class="layui-colla-item">
|
||
<blockquote class="layui-elem-quote" style="text-align: left;font-size: 16px">
|
||
精品推荐
|
||
</blockquote>
|
||
|
||
|
||
<div class="layui-container" style="padding: 0px">
|
||
|
||
<div class="layui-row" style="text-align: center" id="currentWeek" th:if="${bookMap['4']}">
|
||
<span th:each="book,iterStat : ${bookMap['4']}" th:if="${iterStat.index<3}">
|
||
<a th:href="'/book/'+${book.bookId}+'.html'">
|
||
<div style="padding: 1%" class="layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4">
|
||
<img style=" width:100px; height:125px; max-width:100%; max-height:100%;"
|
||
th:src="${book.picUrl}">
|
||
|
||
<br>
|
||
<span th:text="${#strings.length(book.bookName) > 5}? (${#strings.substring(book.bookName,0,5)}+'...'): ${book.bookName} "></span>
|
||
|
||
</div>
|
||
</a>
|
||
</span>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="layui-colla-item">
|
||
<blockquote class="layui-elem-quote" style="text-align: left;font-size: 16px">
|
||
热门推荐
|
||
</blockquote>
|
||
|
||
<div class="layui-container">
|
||
<div class="layui-row" id="hotRecBooks" th:if="${bookMap['3']}">
|
||
<div th:each="book,iterStat : ${bookMap['3']}" th:if="${iterStat.index<6}" style="margin-bottom: 5px"
|
||
class="layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4">
|
||
<a th:href="'/book/'+${book.bookId}+'.html'">
|
||
<div class="layui-col-xs5 layui-col-sm4 layui-col-md4 layui-col-lg4">
|
||
<img style=" width:100px; height:125px;" th:src="${book.picUrl}">
|
||
|
||
</div>
|
||
<div class="layui-col-xs5 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||
<ul>
|
||
<li style="padding-bottom: 2px" class="line-limit-length"
|
||
th:text="${book.bookName}"></li>
|
||
<li style="padding-bottom: 2px;color: #a6a6a6" th:text="'作者:'+${book.authorName}"></li>
|
||
<li style="color: #a6a6a6;width: 180px;height:60px;overflow: hidden"
|
||
th:utext="${book.bookDesc}"></li>
|
||
</ul>
|
||
</div>
|
||
<div style="font-style: italic;color: red"
|
||
class="layui-col-xs2 layui-col-sm2 layui-col-md2 layui-col-lg2"></div>
|
||
</a>
|
||
</div>
|
||
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div style="clear: both"></div>
|
||
<div style="height: 1px" class="layui-col-lg1"></div>
|
||
<div class="layui-colla-item layui-col-lg10"
|
||
style="border-width: 1px;border-style: solid;border-radius: 2px;border-top-width: 0px"><a
|
||
href="javascript:moreNewBooks()">
|
||
<blockquote class="layui-elem-quote" style="text-align: left;color: #000;font-size: 16px">最新更新
|
||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
|
||
class="layui-icon">更多</i>
|
||
</div>
|
||
</blockquote>
|
||
</a>
|
||
<div class="layui-colla-content layui-show">
|
||
|
||
<div class="layui-container" style="padding-left: 2px;padding-right: 5px">
|
||
<div class="layui-row" id="updateRankBooks">
|
||
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div style="clear: both"></div>
|
||
<div th:replace="mobile/common/footer :: footer">
|
||
</div>
|
||
<div th:replace="mobile/common/js :: js">
|
||
</div>
|
||
|
||
<script src="/mobile/js/wap_collect.js"></script>
|
||
|
||
|
||
<script>
|
||
|
||
|
||
//更新榜单查询
|
||
$.ajax({
|
||
type: "get",
|
||
url: "/book/listUpdateRank",
|
||
data: {},
|
||
dataType: "json",
|
||
success: function (data) {
|
||
if (data.code == 200) {
|
||
var updateRankBooks = data.data;
|
||
var updateRankBookHtml = "";
|
||
for (var i = 0; i < 10; i++) {
|
||
|
||
var updateRankBook = updateRankBooks[i];
|
||
if (updateRankBook.bookDesc) {
|
||
updateRankBook.bookDesc = updateRankBook.bookDesc.replace(/<[^>]+>/g, "").replace(/\s+/g, "");
|
||
}
|
||
|
||
updateRankBookHtml += ("<div style=\"padding-bottom: 30px\"\n" +
|
||
" class=\"layui-col-xs12 layui-col-sm6 layui-col-md6 layui-col-lg6\">\n" +
|
||
"\n" +
|
||
" <a href=\"/book/" + updateRankBook.id + ".html\">\n" +
|
||
" <div class=\"line-limit-length layui-col-xs8 layui-col-sm6 layui-col-md6 layui-col-lg6\"><span '>" + (i + 1) + "." + updateRankBook.bookName + "</span> - <span class=\"layui-elip\" style='color: #a6a6a6;'>" + updateRankBook.authorName + "</span>\n" +
|
||
" </div>\n" +
|
||
" <div class=\"layui-col-sm3 layui-col-md3 layui-col-lg3\"\n" +
|
||
" style=\"color: #FF5722;float: right;margin-right:5px\"><i>" + updateRankBook.lastIndexUpdateTime + "</i></div>\n" +
|
||
"\n" +
|
||
" <div style=\"clear: both\"></div>\n" +
|
||
" <div style=\"color: #a6a6a6;padding-left: 5px;padding-top: 5px\"\n" +
|
||
" class=\"layui-elip layui-col-md11 layui-col-sm11 layui-col-lg11\">简介: " + updateRankBook.bookDesc + "" +
|
||
" </div></a>\n" +
|
||
" </div>");
|
||
|
||
|
||
}
|
||
$("#updateRankBooks").html(updateRankBookHtml);
|
||
} else {
|
||
layer.alert(data.msg);
|
||
}
|
||
|
||
}
|
||
,
|
||
error: function () {
|
||
layer.alert('网络异常');
|
||
}
|
||
})
|
||
|
||
|
||
function moreNewBooks(event) {
|
||
window.location.href = "/book/book_ranking.html?sortBy=last_index_update_time";
|
||
}
|
||
|
||
function searchBooks() {
|
||
var keywords = $("#title").val();
|
||
window.location.href = "/book/book_ranking.html?keyword=" + encodeURI(keywords);
|
||
}
|
||
|
||
function toMyCollect() {
|
||
var token = localStorage.getItem("token");
|
||
if (token) {
|
||
window.location.href = "/book/book_ranking.html?token=" + token;
|
||
} else {
|
||
window.location.href = "/user/login.html";
|
||
}
|
||
}
|
||
|
||
</script>
|
||
|
||
|
||
</body>
|
||
</html> |