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:
384
templates/green/html/mobile/book/book_content.html
Normal file
384
templates/green/html/mobile/book/book_content.html
Normal file
@ -0,0 +1,384 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
|
||||
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:utext="${book.bookName}+${bookIndex.indexName}"></title>
|
||||
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${bookIndex.indexName}">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+'最新更新章节免费在线阅读TXT下载'">
|
||||
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
function reinitIframe(){
|
||||
|
||||
var iframe = document.getElementById("frame_content");
|
||||
try{
|
||||
iframe.height = iframe.contentWindow.document.documentElement.scrollHeight;
|
||||
}catch (ex){}
|
||||
}
|
||||
window.setInterval("reinitIframe()", 200);
|
||||
</script>
|
||||
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
|
||||
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
.Readpage {
|
||||
font-size: 14px;
|
||||
padding: 0;
|
||||
background: #d4eaf2;
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
/* background-attachment: fixed; */
|
||||
}
|
||||
|
||||
user agent stylesheet
|
||||
p {
|
||||
display: block;
|
||||
-webkit-margin-before: 1em;
|
||||
-webkit-margin-after: 1em;
|
||||
-webkit-margin-start: 0px;
|
||||
-webkit-margin-end: 0px;
|
||||
}
|
||||
|
||||
.huyanon {
|
||||
border: 1px solid #64c878;
|
||||
box-shadow: 0 1px 2px #b9ecc4 inset, 0 -1px 0 #6c9f76 inset, 0 -2px 3px #b9ecc4 inset;
|
||||
background: -webkit-linear-gradient(top, #90dfa2, #84d494);
|
||||
background: -moz-linear-gradient(top, #90dfa2, #84d494);
|
||||
background: linear-gradient(top, #90dfa2, #84d494);
|
||||
}
|
||||
|
||||
.Readpage a {
|
||||
font-size: 16px;
|
||||
padding: 2px 2px;
|
||||
line-height: 35px;
|
||||
}
|
||||
|
||||
.lightoff, .huyanoff, .sizebgon {
|
||||
border: 1px solid #333;
|
||||
box-shadow: 0 1px 2px #8b8b8b inset, 0 -1px 0 #3d3d3d inset, 0 -2px 3px #8b8b8b inset;
|
||||
background: -webkit-linear-gradient(top, #656565, #4c4c4c);
|
||||
background: -moz-linear-gradient(top, #656565, #4a4a4a);
|
||||
background: linear-gradient(top, #656565, #4a4a4a);
|
||||
}
|
||||
|
||||
.button {
|
||||
width: 40px;
|
||||
line-height: 38px;
|
||||
text-align: center;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
text-shadow: 1px 1px 1px #333;
|
||||
border-radius: 5px;
|
||||
margin: 3px 0px 0px 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #4c6978;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.lighton {
|
||||
border: 1px solid #d2a000;
|
||||
box-shadow: 0 1px 2px #fedd71 inset, 0 -1px 0 #a38b39 inset, 0 -2px 3px #fedd71 inset;
|
||||
background: -webkit-linear-gradient(top, #fece34, #d8a605);
|
||||
background: -moz-linear-gradient(top, #fece34, #d8a605);
|
||||
background: linear-gradient(top, #fece34, #d8a605);
|
||||
}
|
||||
|
||||
.screen_toolbar {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
bottom: 100px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body id="read">
|
||||
<div id="content">
|
||||
|
||||
|
||||
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
|
||||
|
||||
<input type="hidden" id="bookNameHidden" th:value="${book.bookName}"/>
|
||||
|
||||
<input type="hidden" id="contentIdHidden" th:value="${bookIndex.id}"/>
|
||||
|
||||
<input type="hidden" id="indexNameHidden" th:value="${bookIndex.indexName}"/>
|
||||
|
||||
<input type="hidden" id="indexNumHidden" th:value="${bookIndex.indexNum}"/>
|
||||
|
||||
<script>
|
||||
var token = localStorage.getItem("token");
|
||||
</script>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:utext="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="Readpage" style="background:#FFFFFF;padding:2px;">
|
||||
<a id="lightdiv" class="button lightoff" onclick="nr_setbg('light')">关灯</a>
|
||||
<a id="huyandiv" class="button huyanon" onclick="nr_setbg('huyan')">护眼</a>
|
||||
字体:<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon"
|
||||
onclick="nr_setbg('middle')">中</a> <a
|
||||
id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a>
|
||||
</p>
|
||||
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
||||
|
||||
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
|
||||
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
|
||||
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
|
||||
</div>
|
||||
<!--<div id="screenInput" class="screen_toolbar" style="display: none">
|
||||
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md3 layui-col-lg3"></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 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>-->
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
|
||||
style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}">
|
||||
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
||||
<span
|
||||
th:utext="${bookContent.content}"></span></p>
|
||||
</div>
|
||||
<div class="Readarea ReadAjax_content screen_container"
|
||||
style="color: rgb(0, 0, 0); font-size: 20px;background-color: #fff" th:if="${needBuy}">
|
||||
<h5>此章为VIP章节,需要订阅后才能继续阅读</h5>
|
||||
价格:<span style="color: red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span><br/>
|
||||
<a href="javascript:buyBookIndex()" type="button" class="layui-btn layui-btn-sm layui-btn-radius">购买</a>
|
||||
|
||||
</div>
|
||||
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
||||
|
||||
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
|
||||
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
|
||||
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<script>
|
||||
var ua = navigator.userAgent;
|
||||
|
||||
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
|
||||
|
||||
isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
|
||||
|
||||
isAndroid = ua.match(/(Android)\s+([\d.]+)/),
|
||||
|
||||
isMobile = isIphone || isAndroid;
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
//添加阅读记录
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/addReadHistory",
|
||||
data: {'bookId': $("#bookIdHidden").val(), 'preContentId': $("#contentIdHidden").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
},
|
||||
error: function () {
|
||||
}
|
||||
})
|
||||
|
||||
$("#content").css("min-height",($(window).height()-60)+"px");
|
||||
|
||||
|
||||
})();
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<script src="/mobile/js/read.js"></script>
|
||||
<script language="javascript">getset()</script>
|
||||
<script language="javascript">getset1()</script>
|
||||
<script language="javascript">
|
||||
var books = localStorage.getItem("historyBooks");
|
||||
var item = parseInt($("#bookIdHidden").val());
|
||||
if (books) {
|
||||
var booksArr = JSON.parse(books);
|
||||
if (booksArr.length >= 50) {
|
||||
booksArr.splice(0, 1);
|
||||
}
|
||||
booksArr.remove(item);
|
||||
booksArr[booksArr.length] = item;
|
||||
} else {
|
||||
var booksArr = [item];
|
||||
}
|
||||
|
||||
localStorage.setItem("historyBooks", JSON.stringify(booksArr));//
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
|
||||
function buyBookIndex(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/buyBookIndex",
|
||||
data: {'bookId':$("#bookIdHidden").val(),"bookName":$("#bookNameHidden").val(),
|
||||
"bookIndexId":$("#contentIdHidden").val(),"bookIndexName":$("#indexNameHidden").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": $("#bookIdHidden").val()}, function () {
|
||||
});
|
||||
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
363
templates/green/html/mobile/book/book_detail.html
Normal file
363
templates/green/html/mobile/book/book_detail.html
Normal file
@ -0,0 +1,363 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:utext="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
|
||||
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+','+${book.bookName}+'最新章节,'+${book.bookName}+'免费阅读,'+${book.bookName}+'TXT下载'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+'最新章节列表,'+${book.bookName}+'最新更新章节免费无广告无弹窗在线阅读,'+${book.bookName}+'小说TXT免费下载。'">
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.tag-list {
|
||||
padding-top: 0px;
|
||||
padding-bottom: 20px;
|
||||
position: fixed;
|
||||
top: 50px;
|
||||
right: 0px;
|
||||
width: 120px;
|
||||
z-index: 100000;
|
||||
}
|
||||
|
||||
.tag-list .tag {
|
||||
float: right;
|
||||
width: 100%;
|
||||
text-align: right;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.tag-list .tag a {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tag-list .highlight {
|
||||
padding: 5px 9px;
|
||||
border: 1px solid #f90;
|
||||
color: #f90;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.tag-list .highlight .text {
|
||||
color: #f90;
|
||||
}
|
||||
|
||||
.tag-list .tag .text {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
color: #f90;
|
||||
}
|
||||
|
||||
ul, li {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.tag-list .tag a {
|
||||
display: inline-block;
|
||||
margin-right: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.tag-list .highlight .icn {
|
||||
color: #f90;
|
||||
}
|
||||
|
||||
.tag-list .tag .icn {
|
||||
margin-right: 5px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.tag-list .highlight .text {
|
||||
padding-left: 3px;
|
||||
color: #f90;
|
||||
}
|
||||
|
||||
.tag-list .tag .text {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
color: #f90;
|
||||
}
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
|
||||
<ul class="tag-list clearfix" id="tagLi">
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
<input type="hidden" id="bookIdHidden" th:value="${bookId}"/>
|
||||
<input type="hidden" id="bookNamedHidden" th:value="${book.bookName}"/>
|
||||
<input type="hidden" id="preContentId" th:value="${firstBookIndexId}"/>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center"
|
||||
class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon" th:utext="${book.bookName}"></b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-row" style="background: #f2f2f2">
|
||||
<div style="padding: 3px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img style=" width:130px; height:auto; max-width:100%; max-height:100%;" th:src="${book.picUrl}"/>
|
||||
|
||||
</div>
|
||||
<div style="position:relative;padding: 3px 10px 0px"
|
||||
class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'">
|
||||
<div style=";color: #444;" th:utext="'作者:'+ ${book.authorName}"></div>
|
||||
</a>
|
||||
<a th:href="'/book/book_ranking.html?catId='+${book.catId}">
|
||||
<div style="margin-top: 5px;color: #444;" th:text="'类别:'+ ${book.catName}"></div>
|
||||
</a>
|
||||
<div style="margin-top: 5px;color: #444;" th:text="'状态:'+ ${book.bookStatus==0?'连载':'完结'}"></div>
|
||||
<div style="margin-top: 5px;color: #444;">更新:<i
|
||||
th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
|
||||
<div style="margin-top: 5px;color: #444;">评分:<i style="font-weight:bold;color: red"
|
||||
th:text="${book.score} + '分'"></i></div>
|
||||
<div style="margin-top: 5px;color: #444;">点击:<i style="font-weight:bold;color: red"
|
||||
th:text="${book.visitCount}"></i></div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="text-align: center;height: 45px;line-height: 45px">
|
||||
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" type="button"
|
||||
style="background-color:#3eaf7c!important" class="layui-btn layui-btn-sm layui-btn-radius">开始阅读</a>
|
||||
<button type="button" id="cFavs" onclick="addInShell()"
|
||||
style="border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important"
|
||||
class="layui-btn layui-btn-sm layui-btn-radius ">加入书架
|
||||
</button>
|
||||
|
||||
<!--
|
||||
<button type="button" onclick="downloadFile()" class="layui-btn layui-btn-sm layui-btn-radius layui-bg-normal">下载TXT</button>
|
||||
-->
|
||||
</div>
|
||||
<p style="line-height: 23px;padding: 10px;font-size: 14px;color: #333;" th:utext="${book.bookDesc}">
|
||||
|
||||
</p>
|
||||
|
||||
<div class="layui-collapse">
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title">
|
||||
<span>最新章节</span>
|
||||
<span style="margin-left: 30px">
|
||||
更新: <i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd HH:mm:ss')}"></i>
|
||||
</span>
|
||||
</h2>
|
||||
<div class="layui-colla-content layui-show indexP layui-row" id="indexList">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 42px;color:#4c6978;line-height: 42px;padding-left: 30px;background: #f2f2f2">
|
||||
|
||||
<a th:href="'/book/indexList-'+${book.id}+'.html'">查看完整目录</a>
|
||||
</div>
|
||||
|
||||
<!--
|
||||
<div style="position: fixed;top:0px;left:0px;z-index:-100;opacity: 0" th:utext="${attacDivForSearch}"></div>
|
||||
-->
|
||||
</div>
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<script>
|
||||
//查询是否在书架
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId': $("#bookIdHidden").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data) {
|
||||
$("#cFavs").replaceWith("<button type=\"button\" id=\"cFavs\" style=\"border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important\" class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">已在书架</button>");
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
//查询最新目录集合
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/book/queryNewIndexList",
|
||||
data: {'bookId': $("#bookIdHidden").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var indexListHtml = "";
|
||||
for (var i = 0; i < data.data.length; i++) {
|
||||
var bookIndex = data.data[i];
|
||||
indexListHtml += ("<p class=\"line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2\" style=\"padding-left:10px;height: 50px;line-height: 50px;\"><a href=\"/book/" + $("#bookIdHidden").val() + "/" + bookIndex.id + ".html\" style='color: #333'>" + bookIndex.indexName + "</a></p>");
|
||||
}
|
||||
|
||||
$("#indexList").html(indexListHtml);
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
function addInShell() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/addToBookShelf",
|
||||
data: {'bookId': $("#bookIdHidden").val(), 'preContentId': $("#preContentId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$("#cFavs").replaceWith("<button type=\"button\" id=\"cFavs\" style=\"border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important\" class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">已在书架</button>");
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
$("#content").css("min-height", ($(window).height() - 60) + "px");
|
||||
|
||||
function downloadFile() {
|
||||
var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val();
|
||||
window.location.href = fileUrl;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
|
||||
function addToCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
|
||||
if (token) {
|
||||
$.get("/user/addToCollect", {"bookId": $("#bookIdHidden").val(), "token": token}, function (data) {
|
||||
layer.alert(data.desc);
|
||||
if (data.code == 1) {
|
||||
$('#collectButton').unbind("click");
|
||||
$("#collectButton").text("撤下书架");
|
||||
$("#collectButton").click(function () {
|
||||
cancelToCollect();
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
window.location.href = "/user/login.html?bookId=" + $("#bookIdHidden").val();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
function cancelToCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
|
||||
if (token) {
|
||||
$.get("/user/cancelToCollect", {"bookId": $("#bookIdHidden").val(), "token": token}, function (data) {
|
||||
layer.alert(data.desc);
|
||||
if (data.code == 1) {
|
||||
$('#collectButton').unbind("click");
|
||||
$("#collectButton").text("加入书架");
|
||||
$("#collectButton").click(function () {
|
||||
addToCollect();
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
window.location.href = "/user/login.html?bookId=" + $("#bookIdHidden").val();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function searchBooks(keyword) {
|
||||
window.location.href = "/book/book_ranking.html?keyword=" + encodeURI(keyword);
|
||||
}
|
||||
|
||||
$.post("/book/addVisitCount", {"bookId": $("#bookIdHidden").val()}, function () {
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
96
templates/green/html/mobile/book/book_index.html
Normal file
96
templates/green/html/mobile/book/book_index.html
Normal file
@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:utext="${book.bookName}+'最新免费章节目录列表'"></title>
|
||||
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+'最新章节列表,'+${book.bookName}+'最新更新章节免费无广告无弹窗在线阅读TXT下载。'">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="content">
|
||||
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p style="height: 30px;line-height: 30px;padding: 10px">
|
||||
|
||||
<a href="#buttom" style="color: red"> ↓直达页面底部</a>
|
||||
</p>
|
||||
|
||||
|
||||
<div class="layui-colla-content layui-show indexP layui-row">
|
||||
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
|
||||
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
|
||||
|
||||
</a>
|
||||
</p>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<script>
|
||||
$("#content").css("min-height",($(window).height()-60)+"px");
|
||||
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){});
|
||||
function toMyCollect(){
|
||||
var token = localStorage.getItem("token");
|
||||
if(token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
}else{
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
320
templates/green/html/mobile/book/book_ranking.html
Normal file
320
templates/green/html/mobile/book/book_ranking.html
Normal file
@ -0,0 +1,320 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 130px;
|
||||
height: 180px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="token" th:value="${token}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="catId" th:value="${catId}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">小说列表</b>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" th:value="${keyword}">
|
||||
</div>
|
||||
<div class="layui-col-xs1" style="padding: 1%">
|
||||
<button onclick="search(1,20)" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="bookList">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center"></div>
|
||||
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="mobile/common/js :: js"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var catId = getQueryVariable("catId");
|
||||
var bookStatus = getQueryVariable("bookStatus");
|
||||
var sortBy = getQueryVariable("sortBy");
|
||||
var keyword = getQueryVariable("keyword");
|
||||
|
||||
if(keyword != false){
|
||||
$("#title").val(decodeURI(keyword));
|
||||
}else{
|
||||
keyword = "";
|
||||
}
|
||||
|
||||
|
||||
|
||||
search(1,20);
|
||||
|
||||
function search(curr,limit) {
|
||||
|
||||
|
||||
|
||||
var searchData = {};
|
||||
|
||||
searchData.curr = curr;
|
||||
searchData.limit = limit;
|
||||
|
||||
keyword = $("#title").val();
|
||||
|
||||
if(catId != false){
|
||||
searchData.catId = catId;
|
||||
}
|
||||
|
||||
if(bookStatus != false){
|
||||
searchData.bookStatus = bookStatus;
|
||||
}
|
||||
|
||||
if(sortBy != false){
|
||||
searchData.sort = sortBy;
|
||||
}else if(!keyword){
|
||||
sortBy = "last_index_update_time";
|
||||
}
|
||||
|
||||
if(keyword){
|
||||
searchData.keyword = keyword;
|
||||
}
|
||||
|
||||
$.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 end = book.bookDesc.indexOf("<");
|
||||
if(end != -1) {
|
||||
book.bookDesc = book.bookDesc.substring(0,end);
|
||||
}*/
|
||||
|
||||
if(book.bookDesc){
|
||||
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"").replace(/ /g,"");
|
||||
}
|
||||
|
||||
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
|
||||
" <a href=\"/book/"+book.id+".html\">\n" +
|
||||
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
|
||||
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
|
||||
" src=\""+book.picUrl+"\"/>\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
|
||||
" <a href=\"/book/"+book.id+".html\">\n" +
|
||||
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">"+book.bookName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
|
||||
" <a href=\"/book/book_ranking.html?keyword="+encodeURI(book.authorName)+"\">\n" +
|
||||
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:"+book.catName+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
|
||||
" </div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:"+(book.bookDesc?(book.bookDesc.length>15?(book.bookDesc.substr(0,15)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </div>");
|
||||
}
|
||||
$("#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 searchByAllCondition(curr, limit, newKeyword) {
|
||||
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
|
||||
var ids = $("#ids").val();
|
||||
if (ids) {
|
||||
toUrl += ("&historyBookIds=" + ids);
|
||||
}
|
||||
var token = $("#token").val();
|
||||
if (token) {
|
||||
toUrl += ("&token=" + token);
|
||||
}
|
||||
var keyword = $("#keyword").val();
|
||||
if (newKeyword) {
|
||||
toUrl += encodeURI("&keyword=" + newKeyword);
|
||||
} else if (keyword) {
|
||||
toUrl += encodeURI("&keyword=" + keyword);
|
||||
}
|
||||
var bookStatus = $("#bookStatus").val();
|
||||
if (bookStatus) {
|
||||
toUrl += ("&bookStatus=" + bookStatus);
|
||||
}
|
||||
var catId = $("#catId").val();
|
||||
if (catId) {
|
||||
toUrl += ("&catId=" + catId);
|
||||
}
|
||||
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy) {
|
||||
toUrl += ("&sortBy=" + sortBy);
|
||||
}
|
||||
|
||||
var sort = $("#sort").val();
|
||||
if (sort) {
|
||||
toUrl += ("&sort=" + sort);
|
||||
}
|
||||
|
||||
window.location.href = toUrl;
|
||||
}
|
||||
|
||||
function searchBooks() {
|
||||
var keywords = $("#title").val();
|
||||
$("#keyword").val("");
|
||||
searchByAllCondition(1, 20, keywords);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
88
templates/green/html/mobile/book/book_submit.html
Normal file
88
templates/green/html/mobile/book/book_submit.html
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>小说提交</title>
|
||||
|
||||
<div th:include="common/css :: css"></div>
|
||||
|
||||
|
||||
|
||||
</head>
|
||||
<body id="read" >
|
||||
|
||||
</div>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">单本小说提交</b>
|
||||
<div style="float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 800px;padding: 20px;border: 1px solid #eee;">
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">详情页Url:</label>
|
||||
<div class="layui-col-xs7 layui-col-sm6 layui-col-md3 layui-col-lg1" >
|
||||
<input type="text" id="bookUrl" name="bookUrl" required lay-verify="required" placeholder="请输入源站小说详情页Url" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">小说名:</label>
|
||||
<div class="layui-col-xs7 layui-col-sm6 layui-col-md3 layui-col-lg1" >
|
||||
<input type="text" id="bookName" name="bookName" required lay-verify="required" placeholder="请输入小说名" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">小说评分:</label>
|
||||
<div class="layui-col-xs7 layui-col-sm6 layui-col-md3 layui-col-lg1">
|
||||
<input type="number" id="score" name="score" required lay-verify="required" placeholder="请输入小说评分" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit lay-filter="formDemo">提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
|
||||
|
||||
<script>
|
||||
//Demo
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formDemo)', function(){
|
||||
$.post("/book/submit",{"bookUrl":$("#bookUrl").val(),"bookName":$("#bookName").val(),"score":$("#score").val()},function (data) {
|
||||
if(data.code == 1 ){
|
||||
layer.alert("提交成功,任务排队中,请过一段时间后再搜索查看");
|
||||
}else{
|
||||
layer.alert("提交失败");
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
270
templates/green/html/mobile/book/mh_book_search.html
Normal file
270
templates/green/html/mobile/book/mh_book_search.html
Normal file
@ -0,0 +1,270 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.seoConfig.page['mh-search.title']}"></title>
|
||||
|
||||
<meta name="keywords" th:content="${application.seoConfig.page['mh-search.keyword']}">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.seoConfig.page['mh-search.description']}">
|
||||
|
||||
<div th:include="common/css :: css"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 147px;
|
||||
height: 197px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="softTag" th:value="${softTag}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="softCat" th:value="${softCat}"/>
|
||||
|
||||
<ul class="layui-nav" lay-filter="" style="padding:0 20px;text-align: center" >
|
||||
<li id="menunew" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9">最新</a></li>
|
||||
<li id="menu21" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9&softCat=3262">少年漫</a></li>
|
||||
<li id="menu22" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9&softCat=3263">少女漫</a></li>
|
||||
<li id="menucomplete" class="layui-nav-item"><a >完本</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成">全部</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3262">少年漫</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3263">少女漫</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li id="menuhot" class="layui-nav-item"><a >排行</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&sortBy=score">全部</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&sortBy=score&softCat=3262">少年漫</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3263">少女漫</a></dd>
|
||||
</dl>
|
||||
</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" th:value="${keyword}">
|
||||
</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 th:each="book : ${books}" class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<a th:href="'/book/'+ ${book.id} + '.html'">
|
||||
<div class="layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2" style="text-align: center" th:switch = "${application.noLazy}">
|
||||
<img th:case="'1'" align="center"
|
||||
th:attr="data-src=${book.picUrl}"/>
|
||||
<img th:case="*" align="center"
|
||||
class="lazyload" th:attr="data-src=${book.picUrl}"/>
|
||||
</div>
|
||||
</a>
|
||||
<div style="padding: 20px" class="layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<a th:href="'/book/'+ ${book.id} + '.html'">
|
||||
<div class="line-limit-length" style=";color: #4c6978;font-weight: bold;font-size: 15px"
|
||||
th:text="${book.bookName}"></div>
|
||||
</a>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red" th:text="${book.score} + '分'"></i></div>
|
||||
<a th:href="'/book/searchSoftBook.html?catId=9&keyword='+ ${book.author}">
|
||||
<div style=";color: #4c6978;" class="line-limit-length" th:text="'作者:'+ ${book.author}"></div>
|
||||
</a>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.cateName}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.updateTime, 'yy-MM-dd')}"></i>
|
||||
</div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content" th:utext="${book.bookDesc}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center"></div>
|
||||
|
||||
|
||||
<div th:replace="common/soft_footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/js/lazyload.js"></script>
|
||||
|
||||
<script>
|
||||
lazyload();
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'books' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: $("#total").val() //数据总数,从服务端得到,
|
||||
, curr: $("#curr").val()
|
||||
, limit: $("#limit").val()
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
searchByAllCondition(obj.curr,obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function searchByAllCondition(curr,limit,newKeyword){
|
||||
var toUrl = "/book/searchSoftBook.html?catId=9&curr=" + curr + "&limit=" + limit;
|
||||
var ids = $("#ids").val();
|
||||
if(ids){
|
||||
toUrl += ("&historyBookIds=" + ids);
|
||||
}
|
||||
var keyword = $("#keyword").val();
|
||||
if(newKeyword){
|
||||
toUrl += encodeURI("&keyword=" + newKeyword);
|
||||
}else if (keyword) {
|
||||
toUrl += encodeURI("&keyword=" + keyword);
|
||||
}
|
||||
var bookStatus = $("#bookStatus").val();
|
||||
if(bookStatus){
|
||||
toUrl += ("&bookStatus=" + bookStatus);
|
||||
}
|
||||
var softCat = $("#softCat").val();
|
||||
if (softCat) {
|
||||
toUrl += ("&softCat=" + softCat);
|
||||
}
|
||||
var softTag = $("#softTag").val();
|
||||
if (softTag) {
|
||||
toUrl += ("&softTag=" + softTag);
|
||||
}
|
||||
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy) {
|
||||
toUrl += ("&sortBy=" + sortBy);
|
||||
}
|
||||
|
||||
var sort = $("#sort").val();
|
||||
if (sort) {
|
||||
toUrl += ("&sort=" + sort);
|
||||
}
|
||||
|
||||
window.location.href = toUrl;
|
||||
}
|
||||
|
||||
function searchBooks() {
|
||||
var keywords = $("#title").val();
|
||||
$("#keyword").val("");
|
||||
searchByAllCondition(1,20,keywords);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
(function(){
|
||||
|
||||
|
||||
var sortCat = $("#softCat").val();
|
||||
var sortBy = $("#sortBy").val();
|
||||
if(sortBy == 'score'){
|
||||
$("#menuhot").addClass("layui-this");
|
||||
}else if($("#bookStatus").val()){
|
||||
$("#menucomplete").addClass("layui-this");
|
||||
}else if(sortCat){
|
||||
$("#menu"+sortCat).addClass("layui-this");
|
||||
}else{
|
||||
$("#menunew").addClass("layui-this");
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
||||
function toMyCollect(){
|
||||
var token = localStorage.getItem("token");
|
||||
if(token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
}else{
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
294
templates/green/html/mobile/book/soft_book_search.html
Normal file
294
templates/green/html/mobile/book/soft_book_search.html
Normal file
@ -0,0 +1,294 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.seoConfig.page['soft-search.title']}"></title>
|
||||
|
||||
<meta name="keywords" th:content="${application.seoConfig.page['soft-search.keyword']}">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.seoConfig.page['soft-search.description']}">
|
||||
|
||||
<div th:include="common/css :: css"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 147px;
|
||||
height: 197px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="softTag" th:value="${softTag}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="softCat" th:value="${softCat}"/>
|
||||
|
||||
<ul class="layui-nav" lay-filter="" style="padding:0 20px;text-align: center">
|
||||
<li id="menunew" class="layui-nav-item"><a href="/book/searchSoftBook.html">最新</a></li>
|
||||
<li id="menu21" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=21">魔幻</a></li>
|
||||
<li id="menu22" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=22">玄幻</a></li>
|
||||
<li id="menu23" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=23">古风</a></li>
|
||||
<li id="menu24" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=24">科幻</a></li>
|
||||
<li id="menu25" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=25">校园</a></li>
|
||||
<li id="menu26" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=26">都市</a></li>
|
||||
<li id="menu27" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=27">游戏</a></li>
|
||||
<li id="menu28" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=28">同人</a></li>
|
||||
<li id="menu29" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=29">悬疑</a></li>
|
||||
<li id="menu0" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=0">动漫</a></li>
|
||||
<li id="menucomplete" class="layui-nav-item"><a>完本</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成">全部</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=21">魔幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=22">玄幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=23">古风</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=24">科幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=25">校园</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=26">都市</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=27">游戏</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=28">同人</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=29">悬疑</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=0">动漫</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li id="menuhot" class="layui-nav-item"><a>排行</a>
|
||||
<dl class="layui-nav-child"> <!-- 二级菜单 -->
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score">全部</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=21">魔幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=22">玄幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=23">古风</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=24">科幻</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=25">校园</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=26">都市</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=27">游戏</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=28">同人</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=29">悬疑</a></dd>
|
||||
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=0">动漫</a></dd>
|
||||
</dl>
|
||||
</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" th:value="${keyword}">
|
||||
</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 th:each="book : ${books}" class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
|
||||
<a th:href="'/book/'+ ${book.id} + '.html'">
|
||||
<div class="layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2" style="text-align: center"
|
||||
th:switch="${application.noLazy}">
|
||||
<img th:case="'1'" align="center"
|
||||
th:attr="data-src=${book.picUrl}"/>
|
||||
<img th:case="*" align="center"
|
||||
class="lazyload" th:attr="data-src=${book.picUrl}"/>
|
||||
</div>
|
||||
</a>
|
||||
<div style="padding: 20px" class="layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<a th:href="'/book/'+ ${book.id} + '.html'">
|
||||
<div class="line-limit-length" style=";color: #4c6978;font-weight: bold;font-size: 15px"
|
||||
th:text="${book.bookName}"></div>
|
||||
</a>
|
||||
<div style=";color: #4c6978;float: right;"><i style="color: red" th:text="${book.score} + '分'"></i></div>
|
||||
<a th:href="'/book/searchSoftBook.html?keyword='+ ${book.author}">
|
||||
<div style=";color: #4c6978;" class="line-limit-length" th:text="'作者:'+ ${book.author}"></div>
|
||||
</a>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.cateName}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.updateTime, 'yy-MM-dd')}"></i>
|
||||
</div>
|
||||
<div class="layui-collapse" style="margin-top: 5px;">
|
||||
<div class="layui-colla-item">
|
||||
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
|
||||
<div style="color: #4c6978;" class="layui-colla-content" th:utext="${book.bookDesc}">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center"></div>
|
||||
|
||||
|
||||
<div th:replace="common/soft_footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/js/lazyload.js"></script>
|
||||
|
||||
<script>
|
||||
lazyload();
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'books' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: $("#total").val() //数据总数,从服务端得到,
|
||||
, curr: $("#curr").val()
|
||||
, limit: $("#limit").val()
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
searchByAllCondition(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
function searchByAllCondition(curr, limit, newKeyword) {
|
||||
var toUrl = "/book/searchSoftBook.html?curr=" + curr + "&limit=" + limit;
|
||||
var ids = $("#ids").val();
|
||||
if (ids) {
|
||||
toUrl += ("&historyBookIds=" + ids);
|
||||
}
|
||||
var keyword = $("#keyword").val();
|
||||
if (newKeyword) {
|
||||
toUrl += encodeURI("&keyword=" + newKeyword);
|
||||
} else if (keyword) {
|
||||
toUrl += encodeURI("&keyword=" + keyword);
|
||||
}
|
||||
var bookStatus = $("#bookStatus").val();
|
||||
if (bookStatus) {
|
||||
toUrl += ("&bookStatus=" + bookStatus);
|
||||
}
|
||||
var softCat = $("#softCat").val();
|
||||
if (softCat) {
|
||||
toUrl += ("&softCat=" + softCat);
|
||||
}
|
||||
var softTag = $("#softTag").val();
|
||||
if (softTag) {
|
||||
toUrl += ("&softTag=" + softTag);
|
||||
}
|
||||
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy) {
|
||||
toUrl += ("&sortBy=" + sortBy);
|
||||
}
|
||||
|
||||
var sort = $("#sort").val();
|
||||
if (sort) {
|
||||
toUrl += ("&sort=" + sort);
|
||||
}
|
||||
|
||||
window.location.href = toUrl;
|
||||
}
|
||||
|
||||
function searchBooks() {
|
||||
var keywords = $("#title").val();
|
||||
$("#keyword").val("");
|
||||
searchByAllCondition(1, 20, keywords);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
(function () {
|
||||
|
||||
|
||||
var sortCat = $("#softCat").val();
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy == 'score') {
|
||||
$("#menuhot").addClass("layui-this");
|
||||
} else if ($("#bookStatus").val()) {
|
||||
$("#menucomplete").addClass("layui-this");
|
||||
} else if (sortCat) {
|
||||
$("#menu" + sortCat).addClass("layui-this");
|
||||
} else {
|
||||
$("#menunew").addClass("layui-this");
|
||||
}
|
||||
|
||||
})();
|
||||
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
24
templates/green/html/mobile/common/css.html
Normal file
24
templates/green/html/mobile/common/css.html
Normal file
@ -0,0 +1,24 @@
|
||||
<div th:fragment="css">
|
||||
<link rel="stylesheet" href="/mobile/layui/css/layui.css">
|
||||
<style type="text/css">
|
||||
.app {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.app {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: 500px) {
|
||||
.pc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</div>
|
14
templates/green/html/mobile/common/footer.html
Normal file
14
templates/green/html/mobile/common/footer.html
Normal file
@ -0,0 +1,14 @@
|
||||
<div th:fragment="footer" style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
|
||||
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>-->
|
||||
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a>
|
||||
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a>
|
||||
<a href="/user/favorites.html" style="font-size: 14px;color: #fff;margin-left: 8px">书架</a>
|
||||
<a href="/mobile/fiction_house.apk" style="font-size: 14px;color: #fff;margin-left: 8px">客户端</a>
|
||||
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>-->
|
||||
|
||||
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#fff "></i></a>
|
||||
</div>
|
||||
</div>
|
3
templates/green/html/mobile/common/js.html
Normal file
3
templates/green/html/mobile/common/js.html
Normal file
@ -0,0 +1,3 @@
|
||||
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
|
||||
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
|
||||
<script th:fragment="js" src="/mobile/js/common.js"></script>
|
19
templates/green/html/mobile/common/soft_footer.html
Normal file
19
templates/green/html/mobile/common/soft_footer.html
Normal file
@ -0,0 +1,19 @@
|
||||
<div th:fragment="footer" style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
|
||||
<a href="/book" style="font-size: 14px;color: #92B8B1;">更多小说</a>
|
||||
<a href="javascript:readHistory()" style="font-size: 14px;color: #92B8B1;margin-left: 8px">阅读记录</a>
|
||||
<a href="javascript:toMyCollect()" style="font-size: 14px;color: #92B8B1;margin-left: 8px">书架</a>
|
||||
<a href="/mobile/HotBook.apk" style="font-size: 14px;color: #92B8B1;margin-left: 8px">客户端</a>
|
||||
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">开发者</a>-->
|
||||
|
||||
|
||||
<div style="float: right"><a href="#top"><i class="layui-icon"
|
||||
style="margin-right:15px;font-size: 30px;color:#92B8B1 "></i></a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
(function(){
|
||||
var src = (document.location.protocol == "http:") ? "http://js.passport.qihucdn.com/11.0.1.js?0acfeb0f37ba0d8942c2bbf459016f21":"https://jspassport.ssl.qhimg.com/11.0.1.js?0acfeb0f37ba0d8942c2bbf459016f21";
|
||||
document.write('<script src="' + src + '" id="sozz"><\/script>');
|
||||
})();
|
||||
</script>
|
||||
</div>
|
325
templates/green/html/mobile/index.html
Normal file
325
templates/green/html/mobile/index.html
Normal file
@ -0,0 +1,325 @@
|
||||
<!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>
|
212
templates/green/html/mobile/pay/index.html
Normal file
212
templates/green/html/mobile/pay/index.html
Normal file
@ -0,0 +1,212 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 130px;
|
||||
height: 180px;
|
||||
}
|
||||
.payHead {
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
padding: 20px 0 50px;
|
||||
margin: 0 24px;
|
||||
font-size: 16px;
|
||||
border-bottom: 1px solid #eaeaea;
|
||||
zoom: 1;
|
||||
}
|
||||
.pay_way li {
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
border: 2px solid #eee;
|
||||
margin: 20px 0px 3px 43px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="token" th:value="${token}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="catId" th:value="${catId}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">充值</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body" class="layui-row">
|
||||
<div class="payHead cf">
|
||||
<div class="fl">
|
||||
充值账号:<span class="user_name" id="my_name">13560421324</span> 余额:<em style="color: #3eaf7c" id="accountBalance">10</em> 屋币<!--<em class="red">+0</em>代金券-->
|
||||
</div>
|
||||
</div>
|
||||
<div id="payAmount" class="pay_way layui-row layui-col-space15" style="text-align: center;padding-top: 20px;">
|
||||
<h5>选择充值金额</h5>
|
||||
<li vals="10" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>10元</strong><br><span class="pay_mn">1000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li vals="30" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>30元</strong><br><span class="pay_mn">3000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li vals="50" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>50元</strong><br><span class="pay_mn">5000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li vals="100" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>100元</strong><br><span class="pay_mn">10000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li vals="200" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>200元</strong><br><span class="pay_mn">20000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
<li vals="500" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
|
||||
<div class="layui-panel">
|
||||
<div ><strong>500元</strong><br><span class="pay_mn">50000屋币</span></div>
|
||||
</div>
|
||||
</li>
|
||||
|
||||
</div>
|
||||
|
||||
<form action="/pay/aliPay" method="post" id="payform" name="payform">
|
||||
|
||||
<input type="hidden" id="pValue" name="payAmount" />
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="mobile/common/js :: js"></div>
|
||||
|
||||
<script>
|
||||
$("#body").css("min-height",($(window).height() - 100)+"px")
|
||||
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/userInfo",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if(data.data.nickName){
|
||||
$("#my_name").html(data.data.nickName);
|
||||
}else{
|
||||
$("#my_name").html(data.data.username);
|
||||
}
|
||||
|
||||
$("#accountBalance").html(data.data.accountBalance);
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
$("#payAmount").find("li").click(function () {
|
||||
|
||||
$("#pValue").val($(this).attr("vals"));
|
||||
|
||||
$("#payform").submit();
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
268
templates/green/html/mobile/user/favorites.html
Normal file
268
templates/green/html/mobile/user/favorites.html
Normal file
@ -0,0 +1,268 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 130px;
|
||||
height: 180px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="token" th:value="${token}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="catId" th:value="${catId}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">我的书架</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="bookList">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center;"></div>
|
||||
|
||||
</div>
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="mobile/common/js :: js"></div>
|
||||
|
||||
<script>
|
||||
$("#body").css("min-height",($(window).height() - 110)+"px")
|
||||
|
||||
search(1,20);
|
||||
|
||||
function search(curr,limit) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/listBookShelfByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
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 end = book.bookDesc.indexOf("<");
|
||||
if(end != -1) {
|
||||
book.bookDesc = book.bookDesc.substring(0,end);
|
||||
}*/
|
||||
|
||||
if(book.bookDesc){
|
||||
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"").replace(/ /g,"");
|
||||
}
|
||||
|
||||
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
|
||||
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
|
||||
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
|
||||
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
|
||||
" src=\""+book.picUrl+"\"/>\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
|
||||
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
|
||||
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">"+book.bookName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
|
||||
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
|
||||
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:"+book.catName+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
|
||||
" </div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:"+(book.bookDesc?(book.bookDesc.length>15?(book.bookDesc.substr(0,15)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </div>");
|
||||
}
|
||||
$("#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 searchByAllCondition(curr, limit, newKeyword) {
|
||||
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
|
||||
var ids = $("#ids").val();
|
||||
if (ids) {
|
||||
toUrl += ("&historyBookIds=" + ids);
|
||||
}
|
||||
var token = $("#token").val();
|
||||
if (token) {
|
||||
toUrl += ("&token=" + token);
|
||||
}
|
||||
var keyword = $("#keyword").val();
|
||||
if (newKeyword) {
|
||||
toUrl += encodeURI("&keyword=" + newKeyword);
|
||||
} else if (keyword) {
|
||||
toUrl += encodeURI("&keyword=" + keyword);
|
||||
}
|
||||
var bookStatus = $("#bookStatus").val();
|
||||
if (bookStatus) {
|
||||
toUrl += ("&bookStatus=" + bookStatus);
|
||||
}
|
||||
var catId = $("#catId").val();
|
||||
if (catId) {
|
||||
toUrl += ("&catId=" + catId);
|
||||
}
|
||||
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy) {
|
||||
toUrl += ("&sortBy=" + sortBy);
|
||||
}
|
||||
|
||||
var sort = $("#sort").val();
|
||||
if (sort) {
|
||||
toUrl += ("&sort=" + sort);
|
||||
}
|
||||
|
||||
window.location.href = toUrl;
|
||||
}
|
||||
|
||||
function searchBooks() {
|
||||
var keywords = $("#title").val();
|
||||
$("#keyword").val("");
|
||||
searchByAllCondition(1, 20, keywords);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
118
templates/green/html/mobile/user/login.html
Normal file
118
templates/green/html/mobile/user/login.html
Normal file
@ -0,0 +1,118 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>登录</title>
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
|
||||
</head>
|
||||
<body id="read">
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">登录</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action="">
|
||||
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">手机号码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<input id="autoLogin" type="checkbox" lay-skin="primary" title="下次自动登录">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<input type="button" value="登录" id="btnLogin" class="layui-btn" />
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
</body>
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#form1").css("min-height",($(window).height() - 140)+"px")
|
||||
if(localStorage.getItem("autoLogin")==1){
|
||||
$("#autoLogin").prop("checked",'true');
|
||||
layui.form.render('checkbox','loginForm');
|
||||
}else{
|
||||
$("#autoLogin").removeAttr("checked");
|
||||
}
|
||||
$("#btnLogin").click(function () {
|
||||
var username = $("#txtUName").val();
|
||||
if(username.isBlank()){
|
||||
layer.alert("手机号不能为空!");
|
||||
return;
|
||||
}
|
||||
if(!username.isPhone()){
|
||||
layer.alert("手机号格式不正确!");
|
||||
return;
|
||||
}
|
||||
var password = $("#txtPassword").val();
|
||||
if(password.isBlank()){
|
||||
layer.alert("密码不能为空!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/login",
|
||||
data: {"username": username, "password": password},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if($("#autoLogin").is(':checked')){
|
||||
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' });
|
||||
localStorage.setItem("autoLogin","1");
|
||||
}else {
|
||||
$.cookie('Authorization', data.data.token,{ path: '/' });
|
||||
localStorage.setItem("autoLogin","0");
|
||||
}
|
||||
var orginUrl = getSearchString("originUrl");
|
||||
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
266
templates/green/html/mobile/user/read_history.html
Normal file
266
templates/green/html/mobile/user/read_history.html
Normal file
@ -0,0 +1,266 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!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.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
|
||||
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
|
||||
|
||||
.line-limit-length {
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
text-overflow: ellipsis;
|
||||
|
||||
white-space: nowrap;
|
||||
|
||||
}
|
||||
|
||||
.indexP p a {
|
||||
color: #4c6978;
|
||||
}
|
||||
|
||||
.Readarea {
|
||||
font-size: 18px;
|
||||
line-height: 35px;
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
div, p {
|
||||
wrap-work: break-word;
|
||||
word-break: break-all;
|
||||
word-wrap: break-word;
|
||||
word-break: normal;
|
||||
-moz-box-sizing: border-box;
|
||||
-webkit-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
}
|
||||
|
||||
.indexDiv a {
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 130px;
|
||||
height: 180px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<input type="hidden" id="limit" th:value="${limit}"/>
|
||||
<input type="hidden" id="curr" th:value="${curr}"/>
|
||||
<input type="hidden" id="total" th:value="${total}"/>
|
||||
<input type="hidden" id="ids" th:value="${ids}"/>
|
||||
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
|
||||
<input type="hidden" id="token" th:value="${token}"/>
|
||||
<input type="hidden" id="keyword" th:value="${keyword}"/>
|
||||
<input type="hidden" id="catId" th:value="${catId}"/>
|
||||
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
|
||||
<input type="hidden" id="sort" th:value="${sort}"/>
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">阅读历史</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body">
|
||||
<div id="bookList">
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div id="books" style="text-align: center;"></div>
|
||||
|
||||
</div>
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
|
||||
<div th:replace="mobile/common/js :: js"></div>
|
||||
|
||||
<script>
|
||||
$("#body").css("min-height", ($(window).height() - 110) + "px")
|
||||
|
||||
search(1, 20);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/listReadHistoryByPage",
|
||||
data: {'curr': curr, 'limit': limit},
|
||||
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 end = book.bookDesc.indexOf("<");
|
||||
if(end != -1) {
|
||||
book.bookDesc = book.bookDesc.substring(0,end);
|
||||
}*/
|
||||
|
||||
if (book.bookDesc) {
|
||||
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g, "").replace(/\s+/g, "").replace(/ /g, "");
|
||||
}
|
||||
|
||||
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
|
||||
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
|
||||
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
|
||||
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
|
||||
" src=\"" + book.picUrl + "\"/>\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
|
||||
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
|
||||
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">" + book.bookName + "</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
|
||||
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
|
||||
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:" + book.authorName + "</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:" + book.catName + "</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:" + (book.bookStatus == 0 ? '连载' : '完结') + "</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>" + book.lastIndexUpdateTime.substr(0, 11) + "</i>\n" +
|
||||
" </div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:" + (book.bookDesc ? (book.bookDesc.length > 15 ? (book.bookDesc.substr(0, 15) + "...") : book.bookDesc) : book.bookDesc) + "</div>\n" +
|
||||
"\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </div>");
|
||||
}
|
||||
$("#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 searchByAllCondition(curr, limit, newKeyword) {
|
||||
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
|
||||
var ids = $("#ids").val();
|
||||
if (ids) {
|
||||
toUrl += ("&historyBookIds=" + ids);
|
||||
}
|
||||
var token = $("#token").val();
|
||||
if (token) {
|
||||
toUrl += ("&token=" + token);
|
||||
}
|
||||
var keyword = $("#keyword").val();
|
||||
if (newKeyword) {
|
||||
toUrl += encodeURI("&keyword=" + newKeyword);
|
||||
} else if (keyword) {
|
||||
toUrl += encodeURI("&keyword=" + keyword);
|
||||
}
|
||||
var bookStatus = $("#bookStatus").val();
|
||||
if (bookStatus) {
|
||||
toUrl += ("&bookStatus=" + bookStatus);
|
||||
}
|
||||
var catId = $("#catId").val();
|
||||
if (catId) {
|
||||
toUrl += ("&catId=" + catId);
|
||||
}
|
||||
|
||||
var sortBy = $("#sortBy").val();
|
||||
if (sortBy) {
|
||||
toUrl += ("&sortBy=" + sortBy);
|
||||
}
|
||||
|
||||
var sort = $("#sort").val();
|
||||
if (sort) {
|
||||
toUrl += ("&sort=" + sort);
|
||||
}
|
||||
|
||||
window.location.href = toUrl;
|
||||
}
|
||||
|
||||
function searchBooks() {
|
||||
var keywords = $("#title").val();
|
||||
$("#keyword").val("");
|
||||
searchByAllCondition(1, 20, keywords);
|
||||
}
|
||||
|
||||
</script>
|
||||
<script>
|
||||
|
||||
|
||||
function toMyCollect() {
|
||||
var token = localStorage.getItem("token");
|
||||
if (token) {
|
||||
window.location.href = "/book/search?token=" + token;
|
||||
} else {
|
||||
window.location.href = "/user/login.html";
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
122
templates/green/html/mobile/user/register.html
Normal file
122
templates/green/html/mobile/user/register.html
Normal file
@ -0,0 +1,122 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title>注册</title>
|
||||
|
||||
<div th:include="mobile/common/css :: css"></div>
|
||||
|
||||
|
||||
</head>
|
||||
<body id="read">
|
||||
|
||||
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">注册</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action="">
|
||||
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">手机号码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">密码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="layui-form-item ">
|
||||
<label class="layui-form-label">验证码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-input-inline"><img
|
||||
style="border: 1px solid #eee" class="code_pic" src="" id="chkd"
|
||||
onclick="getVerify(this);"/></div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<input type="button" value="注册" id="btnRegister" class="layui-btn" />
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
</body>
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$("#form1").css("min-height",($(window).height() - 140)+"px")
|
||||
$("#chkd").click();
|
||||
|
||||
$("#btnRegister").click(function () {
|
||||
var username = $("#txtUName").val();
|
||||
if (username.isBlank()) {
|
||||
layer.alert("手机号不能为空!");
|
||||
return;
|
||||
}
|
||||
if (!username.isPhone()) {
|
||||
layer.alert("手机号格式不正确!");
|
||||
return;
|
||||
}
|
||||
var password = $("#txtPassword").val();
|
||||
if (password.isBlank()) {
|
||||
layer.alert("密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var velCode = $("#TxtChkCode").val();
|
||||
if (velCode.isBlank()) {
|
||||
layer.alert("验证码不能为空!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/register",
|
||||
data: {"username": username, "password": password,"velCode":velCode},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
$.cookie('Authorization', data.data.token, {path: '/'});
|
||||
window.location.href="/";
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
//获取验证码
|
||||
function getVerify(obj) {
|
||||
obj.src = "/file/getVerify?" + Math.random();
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</html>
|
282
templates/green/html/mobile/user/userinfo.html
Normal file
282
templates/green/html/mobile/user/userinfo.html
Normal file
@ -0,0 +1,282 @@
|
||||
<!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 20px;
|
||||
color: #fff;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.user_link a {
|
||||
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.user_big_head {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="body">
|
||||
|
||||
<!-- 你的HTML代码 -->
|
||||
<div style="height: 50px;line-height: 50px;text-align: center"
|
||||
class="layui-header header header-doc layui-bg-cyan">
|
||||
|
||||
<div style="width:10%;float: left;margin-left: 10px">
|
||||
<a href="javascript:history.go(-1)">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon">用户中心</b>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #fff;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-colla-item">
|
||||
|
||||
<div class="layui-container" style="padding: 50px;text-align: center">
|
||||
<img id="imgLogo" class="user_big_head" src="/images/man.png">
|
||||
<div style="padding: 10px;font-size: 18px"><span id="my_name">梦入神机</span>
|
||||
<svg id="boyIcon" style="display: none" t="1693635090733" class="icon" viewBox="0 0 1024 1024"
|
||||
version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="8815" width="15" height="15">
|
||||
<path d="M872.335 421.516V151.71H602.528L702.949 252.13 601.4 353.68c-46.47-32.81-103.174-52.091-164.385-52.091-157.595 0-285.351 127.756-285.351 285.35S279.421 872.29 437.014 872.29s285.352-127.755 285.352-285.35c0-57.78-17.19-111.537-46.711-156.47l102.818-102.814 93.862 93.861zM437.015 782.18c-107.827 0-195.24-87.413-195.24-195.24s87.413-195.24 195.24-195.24 195.24 87.413 195.24 195.24-87.413 195.24-195.24 195.24z"
|
||||
fill="#1296DB" p-id="8816"></path>
|
||||
</svg>
|
||||
<svg id="girlIcon" style="display: none" t="1693635698738" class="icon" viewBox="0 0 1024 1024"
|
||||
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3685" width="15" height="15">
|
||||
<path d="M513 636.1c-76.4 0-148.2-29.7-202.2-83.8-54-54-83.8-125.8-83.8-202.2s29.7-148.2 83.8-202.2c54-54 125.8-83.8 202.2-83.8s148.2 29.7 202.2 83.8c54 54 83.8 125.8 83.8 202.2s-29.7 148.2-83.8 202.2c-54 54.1-125.8 83.8-202.2 83.8z m0-515.9c-61.4 0-119.2 23.9-162.6 67.4C307 231 283 288.7 283 350.1s23.9 119.2 67.4 162.6 101.2 67.4 162.6 67.4 119.2-23.9 162.6-67.4S743 411.6 743 350.1 719 231 675.6 187.5c-43.4-43.4-101.2-67.3-162.6-67.3z"
|
||||
fill="#d4237a" p-id="3686"></path>
|
||||
<path d="M671.4 712.1H544.7v-104h-56v104H362c-15.5 0-28 12.5-28 28s12.5 28 28 28h126.7v163.3c0 15.5 12.5 28 28 28s28-12.5 28-28V768.1h126.7c15.5 0 28-12.5 28-28s-12.5-28-28-28z"
|
||||
fill="#d4237a" p-id="3687"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="padding: 5px;">账户余额:<span id="accountBalance" style="color: #3eaf7c">3000</span> 屋币</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="clear: both"></div>
|
||||
<a
|
||||
href="/pay/index.html">
|
||||
|
||||
<div
|
||||
style="background-color:#fafafa;text-align: left;padding:20px 10px 30px;color: #000;font-size: 16px">
|
||||
<div style="float: left;">
|
||||
<svg t="1697073258970" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="4079" width="25px" height="25px">
|
||||
<path d="M768 30.72 283.306667 30.72c-51.2 0-98.986667 44.373333-98.986667 98.986667l0 747.52c0 51.2 44.373333 95.573333 98.986667 95.573333l300.373333 0c0 0 71.68 0 116.053333 23.893333 3.413333 0 3.413333 3.413333 6.826667 3.413333 6.826667 0 10.24-3.413333 13.653333-6.826667 3.413333-6.826667 0-17.066667-6.826667-20.48-51.2-30.72-126.293333-30.72-129.706667-30.72L283.306667 942.08c-37.546667 0-64.853333-30.72-64.853333-64.853333L218.453333 129.706667c0-37.546667 30.72-64.853333 64.853333-64.853333l484.693333 0c37.546667 0 68.266667 30.72 68.266667 64.853333l0 747.52c0 37.546667-30.72 64.853333-68.266667 64.853333-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667c51.2 0 98.986667-44.373333 98.986667-95.573333L866.986667 129.706667C866.986667 78.506667 819.2 30.72 768 30.72z"
|
||||
fill="#3eaf7c" p-id="4080"></path>
|
||||
<path d="M604.16 102.4 443.733333 102.4c-6.826667 0-17.066667 6.826667-17.066667 17.066667S436.906667 136.533333 443.733333 136.533333l160.426667 0c6.826667 0 17.066667-6.826667 17.066667-17.066667S610.986667 102.4 604.16 102.4z"
|
||||
fill="#3eaf7c" p-id="4081"></path>
|
||||
<path d="M344.746667 307.2c-6.826667 6.826667-6.826667 17.066667 0 20.48l81.92 81.92c3.413333 3.413333 6.826667 3.413333 10.24 3.413333s6.826667 0 10.24-3.413333c6.826667-6.826667 6.826667-17.066667 0-20.48L365.226667 307.2C358.4 300.373333 351.573333 300.373333 344.746667 307.2z"
|
||||
fill="#3eaf7c" p-id="4082"></path>
|
||||
<path d="M604.16 409.6c3.413333 3.413333 6.826667 3.413333 10.24 3.413333s6.826667 0 10.24-3.413333l81.92-81.92c6.826667-6.826667 6.826667-17.066667 0-20.48s-17.066667-6.826667-20.48 0l-81.92 81.92C597.333333 395.946667 597.333333 402.773333 604.16 409.6z"
|
||||
fill="#3eaf7c" p-id="4083"></path>
|
||||
<path d="M716.8 460.8c6.826667 0 17.066667-6.826667 17.066667-17.066667s-6.826667-17.066667-17.066667-17.066667L334.506667 426.666667c-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667L512 460.8l0 105.813333L334.506667 566.613333c-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667L512 600.746667l0 139.946667c0 6.826667 6.826667 17.066667 17.066667 17.066667s17.066667-6.826667 17.066667-17.066667l0-139.946667L716.8 600.746667c6.826667 0 17.066667-6.826667 17.066667-17.066667s-6.826667-17.066667-17.066667-17.066667l-174.08 0 0-105.813333L716.8 460.8z"
|
||||
fill="#3eaf7c" p-id="4084"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 20px">充值</div>
|
||||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
|
||||
class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/user/favorites.html">
|
||||
|
||||
<div
|
||||
style="background-color:#fafafa;text-align: left;padding:30px 10px;color: #000;font-size: 16px">
|
||||
<div style="float: left;">
|
||||
<svg t="1693622464904" class="icon" viewBox="0 0 1097 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg" p-id="3653" width="25px" height="25px">
|
||||
<path d="M998.58390632 852.14701166H126.84569332A41.51236 41.51236 0 0 0 85.33333332 893.65937166v62.26854a41.51236 41.51236 0 0 0 41.51236 41.51236h871.738213a41.51236 41.51236 0 0 0 41.51236-41.51236v-62.26854a41.51236 41.51236 0 0 0-41.51236-41.51236z m-29.293426 83.014048h-813.172704a8.537246 8.537246 0 0 1-8.537246-8.537246v-3.681687a8.537246 8.537246 0 0 1 8.537246-8.537247h813.172704a8.537246 8.537246 0 0 1 8.537246 8.537247v3.681687a8.537246 8.537246 0 0 1-8.537246 8.537246zM126.84569332 810.63465166h124.537079a41.51236 41.51236 0 0 0 41.51236-41.51236V229.47228566a41.51236 41.51236 0 0 0-41.51236-41.51236H126.84569332A41.51236 41.51236 0 0 0 85.33333332 229.47228566v539.650006a41.51236 41.51236 0 0 0 41.51236 41.51236zM156.72605532 246.49342066h64.883071a12.805869 12.805869 0 0 1 12.805869 12.805869v479.995998a12.805869 12.805869 0 0 1-12.805869 12.80587H156.72605532a12.805869 12.805869 0 0 1-12.80587-12.80587V259.29928966a12.805869 12.805869 0 0 1 12.80587-12.805869z m239.939305 564.141231h124.53708a41.51236 41.51236 0 0 0 41.51236-41.51236V278.62548066l291.653674 510.335237 0.266789 0.480221a41.619075 41.619075 0 0 0 56.826045 15.527116l107.932136-62.962191A42.600859 42.600859 0 0 0 1034.18422332 684.02729066L727.73976932 147.49337866l-0.266789-0.48022a41.619075 41.619075 0 0 0-56.826045-15.527116l-107.932135 62.962191V84.17902666A41.51236 41.51236 0 0 0 521.20244032 42.66666666h-124.53708a41.51236 41.51236 0 0 0-41.51236 41.51236v684.943265a41.51236 41.51236 0 0 0 41.51236 41.51236z m296.295802-597.938055a3.735045 3.735045 0 0 1 5.122348 1.376631l259.841761 454.608363a12.805869 12.805869 0 0 1-4.663471 17.415982l-56.271124 32.825712a12.805869 12.805869 0 0 1-17.544041-4.663471L624.11894332 267.59109066a12.805869 12.805869 0 0 1 4.663471-17.415983zM426.49236432 101.20016166h64.883072a12.805869 12.805869 0 0 1 12.805869 12.805869v625.289257a12.805869 12.805869 0 0 1-12.805869 12.80587h-64.883072a12.805869 12.805869 0 0 1-12.805869-12.80587V114.00603066a12.805869 12.805869 0 0 1 12.805869-12.805869z m0 0"
|
||||
p-id="3654" fill="#3eaf7c"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 20px">我的书架</div>
|
||||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
|
||||
class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a
|
||||
href="/user/read_history.html">
|
||||
|
||||
<div
|
||||
style="background-color:#fafafa;text-align: left;padding:30px 10px 50px;color: #000;font-size: 16px">
|
||||
<div style="float: left;">
|
||||
<svg t="1693621172669" class="icon" viewBox="0 0 1024 1024" version="1.1"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
p-id="1877" width="25px" height="25px">
|
||||
<path d="M876.8 709.12H738.56V591.36c0-15.36-10.24-25.6-25.6-25.6-15.36 0-25.6 10.24-25.6 25.6v143.36c0 15.36 10.24 25.6 25.6 25.6H876.8c15.36 0 25.6-10.24 25.6-25.6s-12.8-25.6-25.6-25.6zM705.28 463.36c-153.6 0-279.04 125.44-279.04 279.04 0 153.6 125.44 279.04 279.04 279.04 153.6 0 279.04-125.44 279.04-279.04 0-153.6-125.44-276.48-279.04-279.04z m0 506.88c-125.44 0-227.84-102.4-227.84-227.84s102.4-227.84 227.84-227.84 227.84 102.4 227.84 227.84c-2.56 128-102.4 227.84-227.84 227.84z m25.6-622.08c0-15.36-10.24-25.6-25.6-25.6h-473.6c-15.36 0-25.6 10.24-25.6 25.6 0 15.36 10.24 25.6 25.6 25.6h473.6c12.8 0 25.6-10.24 25.6-25.6z m-307.2 207.36c0-15.36-10.24-25.6-25.6-25.6h-166.4c-15.36 0-25.6 10.24-25.6 25.6s10.24 25.6 25.6 25.6h166.4c15.36 0 25.6-12.8 25.6-25.6z m-192 153.6c-15.36 0-25.6 10.24-25.6 25.6s10.24 25.6 25.6 25.6h128c15.36 0 25.6-10.24 25.6-25.6s-10.24-25.6-25.6-25.6h-128zM482.56 972.8H90.88V51.2h174.08v38.4c0 33.28 25.6 64 58.88 64 12.8 0 343.04 2.56 373.76 0 33.28 0 58.88-28.16 56.32-61.44v-38.4H928v437.76c0 15.36 10.24 25.6 25.6 25.6 15.36 0 25.6-10.24 25.6-25.6V28.16c0-15.36-10.24-25.6-25.6-25.6H728.32c-15.36 0-25.6 10.24-25.6 25.6v64c0 7.68-5.12 12.8-10.24 12.8H326.4c-7.68 0-12.8-5.12-12.8-12.8V25.6C313.6 10.24 303.36 0 288 0H65.28c-15.36 0-25.6 10.24-25.6 25.6v972.8c0 15.36 10.24 25.6 25.6 25.6h417.28c15.36 0 25.6-10.24 25.6-25.6 0-15.36-12.8-25.6-25.6-25.6zM395.52 51.2h230.4c15.36 0 25.6-10.24 25.6-25.6 0-15.36-10.24-25.6-25.6-25.6h-230.4c-15.36 0-25.6 10.24-25.6 25.6 0 15.36 12.8 25.6 25.6 25.6z"
|
||||
fill="#3eaf7c" p-id="1878"></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div style="float: left; margin-left: 20px">阅读历史</div>
|
||||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
|
||||
class="layui-icon"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<!--<a
|
||||
href="/user/comment.html">
|
||||
|
||||
<blockquote class="layui-elem-quote"
|
||||
style="background-color:#fafafa;border-left:0px;margin-bottom: 0px;text-align: left;padding:15px 10px;color: #000;font-size: 18px">
|
||||
<i style="font-size: 25px;padding-right: 20px;color:#3eaf7c"
|
||||
class="layui-icon">
|
||||
</i>
|
||||
我的书评
|
||||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
|
||||
class="layui-icon"></i>
|
||||
</div>
|
||||
</blockquote>
|
||||
</a>-->
|
||||
|
||||
|
||||
<a
|
||||
href="javascript:logout()">
|
||||
|
||||
<blockquote class="layui-elem-quote"
|
||||
style="background-color:#fafafa;border-left:0px;margin-top:10px;margin-bottom: 10px;text-align: center;padding:15px 10px;color: #3eaf7c;font-size: 16px">
|
||||
|
||||
退出登录
|
||||
</blockquote>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
<div th:replace="mobile/common/footer :: footer">
|
||||
</div>
|
||||
</body>
|
||||
|
||||
<div th:replace="mobile/common/js :: js">
|
||||
</div>
|
||||
|
||||
|
||||
<script>
|
||||
$("#body").css("min-height", ($(window).height() - 50) + "px")
|
||||
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "get",
|
||||
url: "/user/userInfo",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data.userPhoto) {
|
||||
$("#imgLogo").attr("src", data.data.userPhoto);
|
||||
}
|
||||
if (data.data.nickName) {
|
||||
$("#my_name").html(data.data.nickName);
|
||||
} else {
|
||||
$("#my_name").html(data.data.username);
|
||||
}
|
||||
|
||||
if (data.data.userSex === '0') {
|
||||
$("#boyIcon").css("display", "inline")
|
||||
}
|
||||
|
||||
if (data.data.userSex === '1') {
|
||||
$("#girlIcon").css("display", "inline")
|
||||
}
|
||||
|
||||
$("#accountBalance").html(data.data.accountBalance);
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} 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>
|
Reference in New Issue
Block a user