mirror of
https://github.com/201206030/novel-plus.git
synced 2025-07-03 07:56:38 +00:00
上传代码
This commit is contained in:
46
novel-front/src/main/resources/templates/about/contact.html
Normal file
46
novel-front/src/main/resources/templates/about/contact.html
Normal file
@ -0,0 +1,46 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'联系我们_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="联系我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a href="/about/default.html">关于我们</a></li>
|
||||
<li><a class="on" href="/about/contact.html">联系我们</a></li>
|
||||
<li><a href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="aboutBox">
|
||||
<h2>联系我们</h2>
|
||||
<div class="about_info">
|
||||
<p> </p>
|
||||
<p> </p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,54 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'版权声明_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="版权声明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a href="/about/default.html">关于我们</a></li>
|
||||
<li><a href="/about/contact.html">联系我们</a></li>
|
||||
<li><a href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a class="on" href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="aboutBox">
|
||||
<h2>版权声明</h2>
|
||||
<div class="about_info">
|
||||
<p>本版权与免责声明系为保证小说精品屋(<a href="/">www.java2nb.com</a>)的正常发展、规避意外风险而设,其初衷是为了向用户提供不间断的优质数字阅读服务。因此,建议您在接受本站服务之前,请务必仔细阅读本条款。</p>
|
||||
<p>1. 无论是驻站作者原创的作品,还是由读者投稿或转载的文章,其版权均归原作者所有,所有使用必须事先征得原作者同意,若作者有版权声明的或文章从其他网站转载而附带有原所有站的版权声明者,其版权归属以附带声明为准。如有侵犯您的权利,请联系我们,本站立即改正。</p>
|
||||
<p>2. 本站所收录作品、社区话题、书库评论及均属发布者其个人行为,与本站立场无关,并不表示我们赞同文章中的观点,如果有某些文章侵犯了您的权益,请您和我们联系,我们会马上处理。</p>
|
||||
<p>3. 未经本站的明确许可,任何人不得转载、盗链本站作品;不得复制或仿造本网站。</p>
|
||||
<p>4. 如因作品内容、版权和其它问题需要同本网联系的,请在30日内进行。</p>
|
||||
<p>5. 本网站尊重他人之知识产权。如果您确认您的作品在本网站以某种方式被抄袭,并且该行为触犯了中国及国际版权法的,请向本网站做版权投诉并提供相关证明文件及理由。</p>
|
||||
<p>6. 除本网站注明之服务条款外:小说精品屋对本网站上所有内容(包括但不限于本网站上的信息、内容、材料或产品)的合法性、准确性、真实性、实用性和安全性,不提供任何形式的保证,亦不承担任何法律责任。</p>
|
||||
<p>7. 您仅有权按照本网站的明确说明和规定使用、浏览本网站相关服务或页面。未经小说精品屋或相关权利人明确书面许可,不得对本网站任何组成部分(包括作品页 面、作品段落、作品内容等)进行修改、分发、再造、复制、抄袭、交易、转载等。如果本站确定您的行为违法或有损本网站和他人的利益,将保留包括但不限于拒绝提供服务、删除用户账户、提起诉讼的权利。</p>
|
||||
<p>8. 本声明未涉及的问题参见国家有关法律法规,当本声明与国家法律法规冲突时,以国家法律法规为准。本声明的修改及更新权均属于小说精品屋所有。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
44
novel-front/src/main/resources/templates/about/default.html
Normal file
44
novel-front/src/main/resources/templates/about/default.html
Normal file
@ -0,0 +1,44 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'关于我们_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="关于我们,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a class="on" href="/about/default.html">关于我们</a></li>
|
||||
<li><a href="/about/contact.html">联系我们</a></li>
|
||||
<li><a href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="aboutBox">
|
||||
<h2>关于我们</h2>
|
||||
<div class="about_info">
|
||||
<p th:text="#{website.name}+'创建于2019年,是集创作、阅读、作品加工、IP运营为一体的中文小说阅读综合平台。'"></p>
|
||||
<p></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
123
novel-front/src/main/resources/templates/about/news.html
Normal file
123
novel-front/src/main/resources/templates/about/news.html
Normal file
@ -0,0 +1,123 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'新闻公共_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'"/>
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<!--主体 start-->
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a href="/about/default.html">关于我们</a></li>
|
||||
<li><a href="/about/contact.html">联系我们</a></li>
|
||||
<li><a href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="newsBox">
|
||||
<ul class="news_list" id="newsList">
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="pageBox cf" id="newsPage">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--主体 end-->
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>v
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 5);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/news/listByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var newsList = data.data.list;
|
||||
if (newsList.length > 0) {
|
||||
var newsListHtml = "";
|
||||
for (var i = 0; i < newsList.length; i++) {
|
||||
var news = newsList[i];
|
||||
newsListHtml += (" <li>\n" +
|
||||
" <h5><i class=\"dot\"></i><a href=\"newsInfo-"+news.id+".html\" >"+news.title+"</a></h5>\n" +
|
||||
" <p>"+news.createTime+"</p>\n" +
|
||||
" </li>");
|
||||
}
|
||||
$("#newsList").html(newsListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'newsPage' //注意,这里的 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('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
@ -0,0 +1,35 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'新闻公告_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css" />
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="newsMain cf">
|
||||
<div class="nav_sub">
|
||||
当前位置:<a href="/" > 首页 </a> > <a href="/about/news.html" > 新闻公告 </a> > <span th:utext="${news.title}"> </span>
|
||||
</div>
|
||||
<div class="channelWrap channelNews cf">
|
||||
<div class="news_title">
|
||||
<h2 th:utext="${news.title}"></h2>
|
||||
<p class="from" th:text="'来源:'+${news.sourceName}"> <span class="time" th:text="${#dates.format(news.createTime, 'yy-MM-dd')}"></span></p>
|
||||
</div>
|
||||
<div class="news_info" th:utext="${news.content}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
</html>
|
@ -0,0 +1,64 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'投稿说明_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="投稿说明,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<!--主体 start-->
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a href="/about/default.html">关于我们</a></li>
|
||||
<li><a href="/about/contact.html">联系我们</a></li>
|
||||
<li><a href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a class="on" href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="aboutBox">
|
||||
<h2>投稿说明</h2>
|
||||
<div class="about_info">
|
||||
<p>“小说精品屋”是新兴的互联网网站平台,以下声明中的“本站”指的均是“小说精品屋”。</p>
|
||||
<p>凡符合国家法律法规,由作者本人创作的作品,均可在授权本站发表或转载,并将被视为本站的“专栏作家”。</p>
|
||||
<p>凡在本站授权本站发表或转载的作品,根据作品授权的不同级别,其版权归作者所有或作者与小说精品屋共同享有。本站对经授权的作品享有在网络上刊登、转载、排版、宣传等权力。</p>
|
||||
<p>本站一经核实作者作品属于非原创作品,将根据相关规定进行处理。此类作品所产生的一切后果责任由投稿人自负。</p>
|
||||
<p>本站拒绝一切诸如反动、淫秽之类违反国家法律法规的作品,对于那些有悖社会道德伦理、政治色彩强烈的作品本站不予发表。</p>
|
||||
<p>本站谢绝任何不符合小说精品屋原创文学发展方向的作品。</p>
|
||||
<p>本站不建议您在未获得稳定稿酬收入之前,进行休学写作、辞职写作或进行其他可能影响到您正常家庭、学习、工作生活的写作行为。</p>
|
||||
<p>任何在未征得原作者或本站同意,请不要转载本站作品内容,违者自负法律责任!如欲转载本站发表之原创作品,必须请作者或本站联系,并且在转载时应保留本站信息。</p>
|
||||
<h4>作品授权级别说明</h4>
|
||||
<p>为了尊重作者版权、更好地保护作者的切身利益,请您在作者专栏开通后,就发表作品的版权授权,务必以单一选择方式作出选择说明:</p>
|
||||
<p>本站首发:我谨保证我是此作品的著作权合法人,保证此稿件系首发于“小说精品屋”及“小说精品屋”所属合作的网站、平台和媒体,同意小说精品屋作为此稿件版权 的独家发布人。在撤销本委托之前,保证不再将此稿件投给其他出版社媒体,有关此稿件发表和转载等任何事宜,由小说精品屋全权代理,向其他出版媒体推荐作品。</p>
|
||||
<p>他站首发:我谨保证我是此作品的著作权合法人,此作品授权“小说精品屋”及“小说精品屋”所属合作的网站、平台和媒体交流发表,未经作者本人同意,小说精品屋不可向其他出版媒体推荐,其它出版媒体也一律不得转载。 </p>
|
||||
<h4>免责声明</h4>
|
||||
<p>凡有小说精品屋用户未经作者许可,在小说精品屋社区论坛内转载作品,小说精品屋对用户转载行为不负任何责任,但承诺接到作者投诉后,第一时间内删除该贴并对该用户进行扣分处理。</p>
|
||||
<p>属于资料和学习性质的“书评”等版面内容,在无法与作者取得联系的前提下,小说精品屋保证转载后不作为任何商业用途,如作者对此有异议,可以通知小说精品屋将其删除。</p>
|
||||
<p>因有人恶意冒充网络作者向本站投稿,并被本站接受录入非其所有的原创作品,本站不承担任何责任,但保证接到真实作者投诉时,经验证后第一时间内删除该作品及冒充者账号。</p>
|
||||
<p>小说精品屋不保证收录作品稿件的安全性,请作者自行留存原稿。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,90 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'用户协议_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="用户协议,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/about.css"/>
|
||||
</head>
|
||||
<body class="body">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<!--主体 start-->
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
<ul class="log_list">
|
||||
|
||||
<li><a href="/about/default.html">关于我们</a></li>
|
||||
<li><a href="/about/contact.html">联系我们</a></li>
|
||||
<li><a class="on" href="/about/user_agreement.html">用户协议</a></li>
|
||||
<li><a href="/about/copyright.html">版权声明</a></li>
|
||||
<li><a href="/about/submission.html">投稿说明</a></li>
|
||||
<li><a href="/user/feedback.html">反馈留言</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="aboutBox">
|
||||
<h2>用户协议</h2>
|
||||
<div class="about_info">
|
||||
<p>您只有无条件接受以下所有服务条款,才能申请小说精品屋注册账号。</p>
|
||||
<p>1. 特别提示</p>
|
||||
<p>小说精品屋同意按照本协议的规定及其不时发布的操作规则提供基于互联网的相关服务(以下称"网络服务"),为获得网络服务,服务使用人(以下称"用户")同意本协议的全部条款并按照页面上的提示完成全部的注册程序。用户在进行注册程序过程中点击"同意"按钮即表示用户完全接受本协议项下的全部条款。这些条款可由小说精品屋域名所有者随时更新,本服务协议一旦发生变动,小说精品屋将会在相关的页面上提示修改内容。修改后的服务协议一旦在页面上公布即有效代替原来的服务协议。用户可随时造访查阅最新服务协议。用户在使用小说精品屋提供的各项服务之前,应仔细阅读本服务协议,如用户不同意本服务协议及/或随时对其的修改,用户可以主动取消小说精品屋提供的服务。</p>
|
||||
<p>2. 服务内容</p>
|
||||
<p>2.1 小说精品屋网络服务的具体内容由小说精品屋根据实际情况提供,例如文学作品阅读、论坛(BBS)、聊天室、电子邮件、发表新闻评论等。小说精品屋保留随时变更、中断或终止部分或全部网络服务的权利。
|
||||
</p><p>2.2 小说精品屋在提供网络服务时,可能会对部分网络服务(例如VIP作品阅读)的用户收取一定的费用。在此情况下,小说精品屋会在相关页面上做明确的提示。如用户拒绝支付该等费用,则不能使用相关的网络服务。</p><p>2.3 用户理解,小说精品屋仅提供相关的网络服务,除此之外与相关网络服务有关的设备(如电脑、调制解调器及其他与接入互联网有关的装置)及所需的费用(如为接入互联网而支付的电话费及上网费)均应由用户自行负担。</p><p>3. 使用规则</p><p>3.1 用户在申请使用小说精品屋网络服务时,必须向小说精品屋申请注册并提供准确的个人资料,如个人资料有任何变动,必须及时更新。如因资料提供不准确而享受不到相关服务时,小说精品屋不承担任何责任。</p><p>3.2 用户注册成功后,小说精品屋将给予每个用户一个用户账号及相应的密码,该用户账号和密码由用户负责保管;用户应当对以其用户账号进行的所有活动和事件负法律责任。</p><p>3.3 用户同意接受小说精品屋通过电子邮件或其他方式向用户发送的商品促销或其他相关商业信息。</p><p>3.4 用户在使用小说精品屋网络服务过程中,必须遵循以下原则:<br />
|
||||
(A) 遵守中国有关的法律和法规;<br />
|
||||
(B) 不得为任何非法目的而使用网络服务系统;<br />
|
||||
(C) 遵守所有与网络服务有关的网络协议、规定和程序;<br />
|
||||
(D) 不得利用小说精品屋网络服务系统进行任何可能对互联网的正常运转造成不利影响的行为;<br />
|
||||
(E) 不得利用小说精品屋网络服务系统传输任何骚扰性的、中伤他人的、辱骂性的、恐吓性的、庸俗淫秽的或其他任何非法的信息资料;<br />
|
||||
(F) 不得利用小说精品屋网络服务系统进行任何不利于小说精品屋的行为;<br />
|
||||
(G) 就小说精品屋及合作商业伙伴的服务、产品、业务咨询应采取相应机构提供的沟通渠道,不得在公众场合发布有关小说精品屋及相关服务的负面宣传。<br />
|
||||
(H) 如发现任何非法使用用户账号或账号出现安全漏洞的情况,应立即通告小说精品屋。<br />
|
||||
</p><p>4. 内容所有权</p><p>
|
||||
4.1 小说精品屋提供的网络服务内容可能包括:文字、软件、声音、图片、录象、图表等。所有这些内容受版权法、商标法和其它财产所有权法律的保护。</p><p>4.2 用户只有在获得小说精品屋或其他相关权利人的书面授权之后才能使用这些内容,而不能擅自复制、再造这些内容、或创造与内容有关的衍生产品。</p><p>5. 隐私保护</p><p>5.1 保护用户(特别是未成年人)的隐私是小说精品屋的一项基本政策,因此,若父母(监护人)希望未成年人(尤其是十岁以下子女)得以使用本服务,必须以父母(监护人)名义申请注册,在接受本服务时,应以法定监护人身份加以判断本服务是否符合于未成年人。小说精品屋保证不对外公开或向第三方(5.2所列情况除外)提供用户注册资料及用户在使用网络服务时存储在小说精品屋的非公开内容,但下列情况除外:<br />
|
||||
(A) 事先获得用户的明确授权;<br />
|
||||
(B) 根据有关的法律法规要求;<br />
|
||||
(C) 按照相关政府主管部门的要求;<br />
|
||||
(D) 为维护社会公众的利益;<br />
|
||||
(E) 为维护小说精品屋的合法权益。<br />
|
||||
</p><p>5.2 小说精品屋可能会与第三方合作向用户提供相关的网络服务,在此情况下,如该第三方同意承担与小说精品屋同等的保护用户隐私的责任,则小说精品屋可将用户的注册资料等提供给该第三方。</p><p>
|
||||
5.3 在不透露单个用户隐私资料的前提下,小说精品屋有权对整个用户数据库进行技术分析并对已进行分析、整理后的用户数据库进行商业上的利用。尽管小说精品屋对用户的隐私权保护做了极大的努力,但是仍然不能保证现有的安全技术措施使用户的技术信息等不受任何形式的损失。</p><p>
|
||||
6. 免责声明</p><p>
|
||||
6.1 小说精品屋所有者不保证以下事宜:<br />
|
||||
(A)本服务将符合您的要求<br />
|
||||
(B)本服务将不受干扰、及时提供、安全可靠或不会出错。<br />
|
||||
(C)小说精品屋将努力保证连载作品的完整性,但如果由于作者或其它非小说精品屋所能控制的原因导致作品的连载不能继续时,小说精品屋对用户不承担任何责任。<br />
|
||||
(D)因用户滥用账户权力而对小说精品屋服务构成破坏、损害时,小说精品屋有权停止该账号的使用权力。</p><p>6.2用户明确同意其使用小说精品屋网络服务所存在的风险将完全由其自己承担;因其使用小说精品屋网络服务而产生的一切后果也由其自己承担,小说精品屋对用户不承担任何责任。</p><p>7. 服务变更、中断或终止</p><p>
|
||||
7.1 如因系统维护或升级的需要而需暂停网络服务,小说精品屋将尽可能事先进行通告。</p><p>
|
||||
7.2 如发生下列任何一种情形,小说精品屋有权随时中断或终止向用户提供本协议项下的网络服务而无需通知用户:<br />
|
||||
(A)用户提供的个人资料不真实;<br />
|
||||
(B)用户违反本协议中规定的使用规则。</p><p>
|
||||
7.3 除前款所述情形外,小说精品屋同时保留在不事先通知用户的情况下随时中断或终止部分或全部网络服务的权利,对于所有服务的中断或终止而造成的任何损失,小说精品屋无需对用户或任何第三方承担任何责任。</p><p>
|
||||
8. 违约赔偿<br />
|
||||
用户同意保障和维护小说精品屋及其他用户的利益,如因用户违反有关法律、法规或本协议项下的任何条款而给小说精品屋或任何其他第三人造成损失,用户同意承担由此造成的损害赔偿责任。</p><p>
|
||||
9. 法律管辖</p><p>
|
||||
9.1 本协议的订立、执行和解释及争议的解决均应适用中国法律。</p><p>9.2 如双方就本协议内容或其执行发生任何争议,双方应尽量友好协商解决;协商不成时,任何一方均应向小说精品屋域名所有者所在地的人民法院提起诉讼。</p><p>
|
||||
10. 通知和送达<br />
|
||||
本协议项下所有的通知均可通过重要页面公告、电子邮件或常规的信件传送等方式进行;该等通知于发送之日视为已送达收件人。</p><p>
|
||||
11. 其他规定</p><p>
|
||||
11.1 本协议构成双方对本协议之约定事项及其他有关事宜的完整协议,除本协议规定的之外,未赋予本协议各方其他权利。</p><p>
|
||||
11.2 如本协议中的任何条款无论因何种原因完全或部分无效或不具有执行力,本协议的其余条款仍应有效并且有约束力。</p><p>
|
||||
11.3 本协议中的标题仅为方便而设,不具法律或契约效果。</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
190
novel-front/src/main/resources/templates/book/book_comment.html
Normal file
190
novel-front/src/main/resources/templates/book/book_comment.html
Normal file
@ -0,0 +1,190 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'作品评论区_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
|
||||
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
|
||||
<link href="/css/main.css" rel="stylesheet" />
|
||||
<link href="/css/book.css" rel="stylesheet" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="channelBookContent cf">
|
||||
<!--left start-->
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
<div class="pad20">
|
||||
|
||||
<div class="bookComment">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>作品评论区</h3><span id="bookCommentTotal">(0条)</span>
|
||||
</div>
|
||||
<a class="fr" href="#txtComment">发表评论</a>
|
||||
</div>
|
||||
<div class="no_comment" id="noCommentPanel" style="display: none;">
|
||||
<img src="/images/no_comment.png" alt="" />
|
||||
<span class="block">暂无评论</span>
|
||||
</div>
|
||||
<div class="commentBar" id="commentPanel">
|
||||
|
||||
</div>
|
||||
<div class="pageBox cf mt15 mr10" id="commentPage">
|
||||
</div>
|
||||
|
||||
<div class="reply_bar" id="reply_bar">
|
||||
<div class="tit">
|
||||
<span class="fl font16">发表评论</span>
|
||||
<!--未登录状态下不可发表评论,显示以下链接-->
|
||||
<span class="fr black9" style="display:none; ">请先 <a class="orange" href="/user/login.html">登录</a><em class="ml10 mr10">|</em><a class="orange" href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text" placeholder="我来说两句..."></textarea>
|
||||
<div class="reply_btn">
|
||||
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
|
||||
<span class="fr"><a class="btn_ora" href="javascript:void(0);" onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--left end-->
|
||||
|
||||
<!--right start-->
|
||||
<div class="wrap_right fr">
|
||||
|
||||
|
||||
|
||||
<div class="wrap_inner author_info mb20">
|
||||
|
||||
<div class="author_head cf">
|
||||
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
|
||||
id="authorLogoImg"/></a>
|
||||
<div class="msg">
|
||||
<span class="icon_qyzz">签约作家</span>
|
||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:text="${book.authorName}"></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author_intro cf">
|
||||
<h4>作者有话说</h4>
|
||||
<div class="intro_txt" id="authorNote">
|
||||
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
|
||||
</div>
|
||||
</div>
|
||||
<!--如果作者没有其他作品就下方代码整个不显示-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--作者专栏e-->
|
||||
<script type="text/javascript">
|
||||
var authorUId=8;
|
||||
if(authorUId==0)
|
||||
{$("#authorPanel").hide();}
|
||||
else
|
||||
{
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!--right end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$('#txtComment').on('input propertychange', function () {
|
||||
var count = $(this).val().length;
|
||||
$('#emCommentNum').html(count + "/1000");
|
||||
if (count > 1000) {
|
||||
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
|
||||
}
|
||||
});
|
||||
searchComments(1, 20);
|
||||
|
||||
function searchComments(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listCommentByPage",
|
||||
data: {'bookId': $("#bookId").val(),'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#bookCommentTotal").html("("+data.data.total+"条)");
|
||||
var commentListHtml = "";
|
||||
for (var i = 0; i < commentList.length; i++) {
|
||||
var comment = commentList[i];
|
||||
commentListHtml += ("<div class=\"comment_list cf\">" +
|
||||
"<div class=\"user_heads fl\" vals=\"389\">" +
|
||||
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
|
||||
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" +
|
||||
comment.commentContent+
|
||||
"</li><li class=\"other cf\">" +
|
||||
"<span class=\"time fl\">"+comment.createTime+"</span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
|
||||
"</span></li>\t\t</ul>\t</div>");
|
||||
}
|
||||
$("#commentPanel").html(commentListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'commentPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
searchComments(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
297
novel-front/src/main/resources/templates/book/book_content.html
Normal file
297
novel-front/src/main/resources/templates/book/book_content.html
Normal file
@ -0,0 +1,297 @@
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'_'+${bookIndex.indexName}+'_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
|
||||
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'" />
|
||||
<link rel="stylesheet" href="/css/read.css" />
|
||||
<link href="/css/book.css" rel="stylesheet" />
|
||||
|
||||
</head>
|
||||
<link href="/layui/css/layui.css" rel="stylesheet"/>
|
||||
<style type="text/css">
|
||||
.screen_toolbar {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
text-align: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
</style>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
BookDetail.SetReadFontFamilyClear(0);
|
||||
var font = localStorage.getItem("fonts");
|
||||
var colorNum = localStorage.getItem("colorNum");
|
||||
var fontNum = localStorage.getItem("fontNum");
|
||||
|
||||
|
||||
</script>
|
||||
<body class="read_style_1" oncontextmenu="return false" onselectstart="return false"
|
||||
ondragstart="return false" onbeforecopy="return false" oncopy="document.selection.empty()"
|
||||
onselect="document.selection.empty()">
|
||||
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
<input type="hidden" id="preContentId" th:value="${bookIndex.id}"/>
|
||||
|
||||
<div th:replace="common/top :: top('10')">
|
||||
</div>
|
||||
|
||||
<div id="showDetail">
|
||||
|
||||
<div class="readBody cf">
|
||||
<div class="readMain cf">
|
||||
<div class="read_menu">
|
||||
<div class="menu_left" style="">
|
||||
<ul>
|
||||
<li><a class="ico_catalog" th:href="'/book/indexList-'+${book.id}+'.html'" title="目录">
|
||||
<b>目录</b></a></li>
|
||||
<li><a class="ico_page" th:href="'/book/'+${book.id}+'.html'" title="返回书页"><b>书页</b></a></li>
|
||||
<li class="li_shelf" id="cFavs"><a class="ico_shelf" href="javascript:void(0);" title="加入书架"
|
||||
onclick="javascript:BookDetail.AddFavorites(37,1959973,1);"><b>加书架</b></a></li>
|
||||
<li class="li_shelfed" style="display: none;"><a class="ico_shelfed" href="javascript:void(0);"
|
||||
title="已收藏"><b>已收藏</b></a></li>
|
||||
|
||||
<li><a class="ico_comment" th:href="'/book/comment-'+${book.id}+'.html'" title="评论">
|
||||
<b>评论</b></a></li>
|
||||
<li><a class="ico_setup" href="javascript:void(0);" title="设置"><b>设置</b></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="menu_right" style="position: fixed; bottom: 0">
|
||||
<ul>
|
||||
<li><a class="ico_pagePrev" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'" title="上一章"><i>上一章</i></a></li>
|
||||
<li><a class="ico_pageNext" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'" title="下一章"><i>下一章</i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readWrap">
|
||||
<div class="bookNav">
|
||||
<a href="/" >首页 </a>> <a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}">
|
||||
</a>> <a th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}">
|
||||
|
||||
</a>
|
||||
</div>
|
||||
<div id="readcontent">
|
||||
<div class="textbox cf">
|
||||
|
||||
<div class="book_title">
|
||||
<h1 th:text="${bookIndex.indexName}">
|
||||
</h1>
|
||||
<div class="textinfo">
|
||||
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
|
||||
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'" th:text="${book.authorName}"></a><span th:text="'字数:'+${bookIndex.wordCount}"></span><span th:text="'更新时间:'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="txtwrap">
|
||||
<div id="showReading" class="readBox" style="font-size: 16px; font-family: microsoft yahei" th:utext="${bookContent.content}">
|
||||
|
||||
|
||||
<div class="pc_bar" style="display: none;">
|
||||
<a href="javascript:void(0);" class="icon_pc" onclick="javascript:uFans.startSupportRead();">
|
||||
<span><i class="icon_yb"></i><em>捧场</em></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="nextPageBox">
|
||||
<a class="prev" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a> <a class="dir" th:href="'/book/indexList-'+${book.id}+'.html'"
|
||||
>目录</a> <a class="next" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readPopup qrBox" style="display: none">
|
||||
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.qrBox').hide();"></a>
|
||||
<div class="popupTit">
|
||||
<h3>手机阅读</h3>
|
||||
</div>
|
||||
<div class="qrList">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="readPopup setupBox" style="display: none;">
|
||||
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.setupBox').hide();"></a>
|
||||
<div class="popupTit">
|
||||
<h3>设置</h3>
|
||||
</div>
|
||||
<div class="setupList">
|
||||
<ul>
|
||||
<li class="readTheme">
|
||||
<em class="tit">阅读主题:</em>
|
||||
<a id="setup_color_white" class="white current"
|
||||
href="javascript:void(0);" title="白色" onclick="javascript:BookDetail.SetBackUpColor(1);"></a><a id="setup_color_green" class="green" href="javascript:void(0);" title="绿色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(2);"></a><a id="setup_color_pink" class="pink"
|
||||
href="javascript:void(0);" title="粉色" onclick="javascript:BookDetail.SetBackUpColor(3);"></a><a id="setup_color_yellow" class="yellow" href="javascript:void(0);" title="黄色"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(4);"></a><a id="setup_color_gray" class="gray"
|
||||
href="javascript:void(0);" title="灰色" onclick="javascript:BookDetail.SetBackUpColor(5);"></a><a id="setup_color_night" class="night" href="javascript:void(0);" title="夜间"
|
||||
onclick="javascript:BookDetail.SetBackUpColor(6);"></a></li>
|
||||
<li class="setFont setBtn"><em class="tit">正文字体:</em> <a id="setup_font_yahei" class="setYahei current"
|
||||
href="javascript:void(0);" onclick="javascript:BookDetail.SetReadFontFamily(0);">雅黑</a> <a id="setup_font_simsun" class="setSimsun" href="javascript:void(0);" onclick="javascript:BookDetail.SetReadFontFamily(1);">宋体</a> <a id="setup_font_ks" class="setKs" href="javascript:void(0);" onclick="javascript:BookDetail.SetReadFontFamily(2);">楷书</a> </li>
|
||||
<li class="fontSize setBtn"><em class="tit">字体大小:</em> <a class="small" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SetReadFont(-2);">A-</a><span class="current_font"
|
||||
id="cFonts">
|
||||
16</span><a class="big" href="javascript:void(0);" onclick="javascript:BookDetail.SetReadFont(2);">A+</a> </li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="maskBox" style="display: none">
|
||||
</div>
|
||||
<div id="showError">
|
||||
<span id="LabErrorStatus"></span>
|
||||
</div>
|
||||
|
||||
<div class="maskBox" style="display: none" onclick="javascript:uFans.closeBox();"></div>
|
||||
<div class="readPopup pcBox" style="display: none" id="showPC"></div>
|
||||
<div class="readPopup flowerBox" style="display: none" id="showFlower"></div>
|
||||
<div class="readPopup newsTipBox" style="display: none;" id="showNote"></div>
|
||||
|
||||
<!--
|
||||
<div id="screenInput" class="screen_toolbar" >
|
||||
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md4 layui-col-lg4"></div>
|
||||
<div class="layui-col-xs6 layui-col-sm4 layui-col-md4 layui-col-lg4">
|
||||
<input type="text" id="screenBulletText" required lay-verify="required" placeholder="请输入弹幕内容,右下角开关可控制弹幕是否开启" autocomplete="off"
|
||||
class="layui-input">
|
||||
|
||||
</div>
|
||||
<div class="layui-col-xs2 layui-col-sm1 layui-col-md1 layui-col-lg1">
|
||||
<button class="layui-btn layui-btn-danger send">发送</button>
|
||||
</div>
|
||||
</div>
|
||||
<form id="screenSwitch" class="layui-form">
|
||||
<div class="layui-form-item" style="position: fixed;right: 0px;bottom: 100px" title="弹幕开关">
|
||||
<!– <label class="layui-form-label" style="opacity:0.5;font-weight: bold;color: red;">弹幕</label>–>
|
||||
<div class="layui-input-block">
|
||||
<input class="clear" type="checkbox" name="switch" lay-skin="switch">
|
||||
</div>
|
||||
</div>
|
||||
</form>-->
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
if(font){
|
||||
$(".readBox").css("font-size", font + "px");
|
||||
$("#cFonts").html(font);
|
||||
$("#ChapterBody").attr("class","article-content font"+font);
|
||||
BookDetail.reShowCover();
|
||||
}
|
||||
if(fontNum){
|
||||
BookDetail.SetReadFontFamily(fontNum);
|
||||
}
|
||||
if(colorNum){
|
||||
BookDetail.SetBackUpColor(colorNum);
|
||||
if(colorNum == 6){
|
||||
$(".logo img").attr("src", "/images/logo_white.png");
|
||||
}
|
||||
}
|
||||
//查询是否在书架
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId':$("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if(data.data){
|
||||
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
|
||||
}
|
||||
//添加阅读记录
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/addReadHistory",
|
||||
data: {'bookId': $("#bookId").val(), 'preContentId': $("#preContentId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
|
||||
},
|
||||
error: function () {
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
} else if(data.code == 1001){
|
||||
//未登录
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
var currentBId =37, usfltotal = 0, spmymoney = 0;
|
||||
$(function () {
|
||||
BookDetail.GetReadSet(37,1959973,0,1959974,1);
|
||||
BookDetail.ClickChapter(37,1959973,0);
|
||||
BookDetail.GetFavorites(37);
|
||||
$(".ico_setup").click(function () {
|
||||
|
||||
$(".maskBox,.setupBox").show();
|
||||
});
|
||||
$(".ico_phone").click(function () {
|
||||
$(".maskBox,.qrBox").show();
|
||||
});
|
||||
|
||||
$(window).scroll(function () {
|
||||
var vtop = $(document).scrollTop();
|
||||
var vbottom = $(document).height() - vtop - $(window).height();
|
||||
if (vtop > 50) {
|
||||
$(".menu_left").css("position", "fixed"); $(".menu_left").css("top", "2px");
|
||||
}
|
||||
else {
|
||||
$(".menu_left").css("position", "absolute"); $(".menu_left").css("top", "60px")
|
||||
}
|
||||
|
||||
if (vbottom < 150) {
|
||||
$(".menu_right").css("position", "absolute"); $(".menu_right").css("bottom", "150px");
|
||||
}
|
||||
else {
|
||||
$(".menu_right").css("position", "fixed"); $(".menu_right").css("bottom", "2px");
|
||||
}
|
||||
});
|
||||
|
||||
var bgClass = '1';
|
||||
if (bgClass == 6) {
|
||||
$(".logo img").attr("src", "/images/logo_white.png");
|
||||
}
|
||||
$(".readTheme a").click(function () {
|
||||
$(".logo img").attr("src", "/images/logo.png");
|
||||
})
|
||||
$("#setup_color_night").click(function () {
|
||||
$(".logo img").attr("src", "/images/logo_white.png");
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
function enterPreIndexPage(bookId,bookIndexId){
|
||||
if(bookIndexId != 0){
|
||||
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
|
||||
}else{
|
||||
layer.alert("已经是第一章了!");
|
||||
}
|
||||
|
||||
}
|
||||
function enterNextIndexPage(bookId,bookIndexId){
|
||||
if(bookIndexId != 0){
|
||||
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
|
||||
}else{
|
||||
layer.alert("已经是最新章节了!");
|
||||
}
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
375
novel-front/src/main/resources/templates/book/book_detail.html
Normal file
375
novel-front/src/main/resources/templates/book/book_detail.html
Normal file
@ -0,0 +1,375 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+#{website.name}"></title>
|
||||
<meta name="keywords"
|
||||
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
|
||||
<meta name="description"
|
||||
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${book.bookName}+'由作家'+${book.authorName}+'创作,'+#{website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+#{website.name}+'。'"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
<link href="/css/book.css?v=2019" rel="stylesheet"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<input type="hidden" id="lastBookIndexId" th:value="${book.lastIndexId}"/>
|
||||
<input type="hidden" id="bookCatId" th:value="${book.catId}"/>
|
||||
<input type="hidden" id="bookId" th:value="${book.id}"/>
|
||||
<input type="hidden" id="preContentId" th:value="${firstBookIndexId}"/>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="nav_sub">
|
||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>
|
||||
</div>
|
||||
<div class="channelWrap channelBookInfo cf">
|
||||
<div class="bookCover cf">
|
||||
<a th:href="${book.picUrl}" class="book_cover"><img class="cover" th:src="${book.picUrl}"
|
||||
th:attr="alt=${book.bookName}"/></a>
|
||||
<div class="book_info">
|
||||
<div class="tit">
|
||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
|
||||
th:text="${book.authorName}+' 著'"></a>
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
|
||||
<span class="item" th:switch="${book.bookStatus}">状态:<em th:case="'0'">连载中</em><em th:case="*">已完结</em></span>
|
||||
<span class="item">总点击:<em id="cTotal" th:text="${book.visitCount}"></em></span>
|
||||
<span class="item">总字数:<em th:text="${book.wordCount}"></em></span></li>
|
||||
</ul>
|
||||
<div class="intro_txt">
|
||||
<p th:utext="${book.bookDesc}"></p>
|
||||
<a class="icon_hide" href="javascript:void(0)" onclick=""><i></i>收起</a>
|
||||
<a class="icon_show" href="javascript:void(0)" onclick=""><i></i>展开</a>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" class="btn_ora">点击阅读</a>
|
||||
<span id="cFavs"><a href="javascript:void(0);" class="btn_ora_white btn_addsj"
|
||||
onclick="javascript:BookDetail.AddFavorites(37,0,0);">加入书架</a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="channelBookContent cf">
|
||||
<!--left start-->
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
|
||||
<!--章节目录 start-->
|
||||
<div class="pad20_nobt">
|
||||
<div class="bookChapter">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>最新章节</h3><span id="bookIndexCount">(0章)</span></div>
|
||||
<a class="fr" th:href="'/book/indexList-'+${book.id}+'.html'">全部目录</a>
|
||||
</div>
|
||||
<ul class="list cf">
|
||||
<li>
|
||||
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:text="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
|
||||
<span class="black9 fr"
|
||||
th:text="'更新时间:'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
|
||||
</li>
|
||||
<li class="zj_yl" id="lastBookContent"> </li>
|
||||
<!--此处是该章节预览,截取最前面的42个字-->
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!--章节目录 end-->
|
||||
|
||||
<!--作品评论区 start-->
|
||||
<div class="pad20">
|
||||
<div class="bookComment">
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3>作品评论区</h3><span id="bookCommentTotal">(0条)</span>
|
||||
</div>
|
||||
<a class="fr" href="#txtComment">发表评论</a>
|
||||
</div>
|
||||
<div class="no_comment" id="noCommentPanel" style="display: none;">
|
||||
<img src="/images/no_comment.png" alt=""/>
|
||||
<span class="block">暂无评论</span>
|
||||
</div>
|
||||
<div class="commentBar" id="commentPanel">
|
||||
|
||||
</div>
|
||||
|
||||
<!--无评论时此处隐藏-->
|
||||
<div class="more_bar" id="moreCommentPanel">
|
||||
<a th:href="'/book/comment-'+${book.id}+'.html'">查看全部评论></a>
|
||||
</div>
|
||||
|
||||
<div class="reply_bar" id="reply_bar">
|
||||
<div class="tit">
|
||||
<span class="fl font16">发表评论</span>
|
||||
<!--未登录状态下不可发表评论,显示以下链接-->
|
||||
<span class="fr black9" style="display:none; ">请先 <a class="orange"
|
||||
href="/user/login.html">登录</a><em
|
||||
class="ml10 mr10">|</em><a class="orange"
|
||||
href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text"
|
||||
placeholder="我来说两句..."></textarea>
|
||||
<div class="reply_btn">
|
||||
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
|
||||
<span class="fr"><a class="btn_ora" href="javascript:void(0);"
|
||||
onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--作品评论区 end-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--left end-->
|
||||
|
||||
<!--right start-->
|
||||
<div class="wrap_right fr">
|
||||
|
||||
|
||||
<script src="/javascript/authorinfo.js?uid=8" type="text/javascript"></script>
|
||||
<!--作者专栏s-->
|
||||
<div class="wrap_inner author_info mb20">
|
||||
|
||||
<div class="author_head cf">
|
||||
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
|
||||
id="authorLogoImg"/></a>
|
||||
<div class="msg">
|
||||
<span class="icon_qyzz">签约作家</span>
|
||||
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
|
||||
th:text="${book.authorName}"></a></h4>
|
||||
</div>
|
||||
</div>
|
||||
<div class="author_intro cf">
|
||||
<h4>作者有话说</h4>
|
||||
<div class="intro_txt" id="authorNote">
|
||||
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
|
||||
</div>
|
||||
</div>
|
||||
<!--如果作者没有其他作品就下方代码整个不显示-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--作者专栏e-->
|
||||
<script type="text/javascript">
|
||||
var authorUId = 8;
|
||||
if (authorUId == 0) {
|
||||
$("#authorPanel").hide();
|
||||
} else {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="RelateBookOther" class="wrap_inner wrap_right_cont mb20">
|
||||
<div class="title cf">
|
||||
<h3 class="on">同类推荐</h3>
|
||||
</div>
|
||||
<div class="tj_bar">
|
||||
<ul id="recBookList">
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--right end-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js?v=1.1" type="text/javascript"></script>
|
||||
<script src="/javascript/ufans.js?v=1" type="text/javascript"></script>
|
||||
|
||||
|
||||
<div class="maskBox" style="display:none" onclick="javascript:uFans.closeBox();"></div>
|
||||
<div class="readPopup pcBox" style="display:none" id="showPC"></div>
|
||||
<div class="readPopup flowerBox" style="display:none" id="showFlower"></div>
|
||||
<div class="readPopup newsTipBox" style="display:none;" id="showNote"></div>
|
||||
<script type="text/javascript">
|
||||
var pathname = window.location.pathname;
|
||||
var bookId = pathname.substring(pathname.lastIndexOf("/") + 1, pathname.lastIndexOf("."))
|
||||
//查询章节信息
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/queryBookIndexAbout",
|
||||
data: {'bookId': bookId, 'lastBookIndexId': $("#lastBookIndexId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookIndexData = data.data;
|
||||
$("#bookIndexCount").html("(" + bookIndexData.bookIndexCount + "章)");
|
||||
$("#lastBookContent").html(bookIndexData.lastBookContent + "...");
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
//查询是否在书架
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId': $("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data) {
|
||||
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
//加载评价列表
|
||||
loadCommentList();
|
||||
|
||||
function loadCommentList(){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listCommentByPage",
|
||||
data: {'bookId': $("#bookId").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#bookCommentTotal").html("("+data.data.total+"条)");
|
||||
var commentListHtml = "";
|
||||
for (var i = 0; i < commentList.length; i++) {
|
||||
var comment = commentList[i];
|
||||
commentListHtml += ("<div class=\"comment_list cf\">" +
|
||||
"<div class=\"user_heads fl\" vals=\"389\">" +
|
||||
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
|
||||
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" +
|
||||
comment.commentContent+
|
||||
"</li><li class=\"other cf\">" +
|
||||
"<span class=\"time fl\">"+comment.createTime+"</span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
|
||||
"</span></li>\t\t</ul>\t</div>");
|
||||
}
|
||||
$("#commentPanel").html(commentListHtml);
|
||||
$("#noCommentPanel").hide();
|
||||
$("#commentPanel").show();
|
||||
$("#moreCommentPanel").show();
|
||||
|
||||
} else {
|
||||
$("#commentPanel").hide();
|
||||
$("#moreCommentPanel").hide();
|
||||
$("#noCommentPanel").show();
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
var currentBId = 37, spmymoney = 0;
|
||||
var relationStep = 0;
|
||||
var authorUId = 8;
|
||||
$(function () {
|
||||
$(".icon_show").click(function () {
|
||||
$(this).hide();
|
||||
$(".icon_hide").show();
|
||||
$(".intro_txt").innerHeight("auto");
|
||||
});
|
||||
$(".icon_hide").click(function () {
|
||||
$(this).hide();
|
||||
$(".icon_show").show();
|
||||
$(".intro_txt").innerHeight("");
|
||||
});
|
||||
|
||||
|
||||
|
||||
$("#AuthorOtherNovel li").unbind("mouseover");
|
||||
|
||||
$('#txtComment').on('input propertychange', function () {
|
||||
var count = $(this).val().length;
|
||||
$('#emCommentNum').html(count + "/1000");
|
||||
if (count > 1000) {
|
||||
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
|
||||
}
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
var bookCatId = $("#bookCatId").val();
|
||||
//查询同类推荐
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listRecBookByCatId",
|
||||
data: {'catId': bookCatId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var recBookList = data.data;
|
||||
var recBookListHtml = "";
|
||||
for (var i = 0; i < recBookList.length; i++) {
|
||||
var recBook = recBookList[i];
|
||||
recBookListHtml += ("<li>\n" +
|
||||
" <div class=\"book_intro\">\n" +
|
||||
" <div class=\"cover\">\n" +
|
||||
" <a href=\"/book/" + recBook.id + ".html\" ><img src=\"" + recBook.picUrl + "\" alt=\"" + recBook.bookName + "\" /></a>\n" +
|
||||
" </div>\n" +
|
||||
" <div class=\"dec\">\n" +
|
||||
" <a class=\"book_name\" href=\"/book/" + recBook.id + ".html\" >" + recBook.bookName + "</a>\n" +
|
||||
" <a class=\"txt\" href=\"/book/" + recBook.id + ".html\" >\n" + recBook.bookDesc +
|
||||
" </a>\n" +
|
||||
" </div>\n" +
|
||||
" </div>\n" +
|
||||
" </li>");
|
||||
|
||||
|
||||
}
|
||||
$("#recBookList").html(recBookListHtml);
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
$.post("/book/addVisitCount", {"bookId": bookId}, function () {
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,62 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
<link rel="stylesheet" href="/css/book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="nav_sub">
|
||||
<a href="/" th:text="#{website.name}"></a>><a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>><a
|
||||
th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>><a
|
||||
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
|
||||
</div>
|
||||
<div class="channelWrap channelChapterlist cf mb50">
|
||||
|
||||
<div class="bookMain">
|
||||
<div class="bookCover cf">
|
||||
<div class="book_info1">
|
||||
<div class="tit">
|
||||
<h1 th:text="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>
|
||||
<span>作者:<a href="javascript:void(0)" th:text="${book.authorName}"></a></span>
|
||||
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
|
||||
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
|
||||
th:case="*">已完结</em></span>
|
||||
<span>总点击:<em class="black3" id="cTotal" th:text="${book.visitCount}"></em></span>
|
||||
<span>总字数:<em class="black3" th:text="${book.wordCount}"></em></span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="dirWrap cf">
|
||||
<h3 th:text="'正文('+${bookIndexCount}+')'"></h3>
|
||||
<div class="dirList">
|
||||
<ul th:each="bookIndex : ${bookIndexList}">
|
||||
<li><a th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:text="${bookIndex.indexName}"><!--<i class="red"> [免费]</i-->></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
131
novel-front/src/main/resources/templates/book/book_ranking.html
Normal file
131
novel-front/src/main/resources/templates/book/book_ranking.html
Normal file
@ -0,0 +1,131 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'小说排行榜_'+#{website.name}"></title>
|
||||
<meta name="keywords" content="小说排行榜,热门小说榜,小说排行榜完结版,完结小说排行榜,完本小说排行榜,最新小说排行榜,网络小说排行榜,排行榜,点击榜,新书榜,推荐榜" />
|
||||
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+#{website.name}+'。'" />
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<link rel="stylesheet" href="/css/book.css" />
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('2')">
|
||||
</div>
|
||||
<div class="main box_center cf mb50">
|
||||
<div class="channelRankingContent cf">
|
||||
<div class="wrap_left fl">
|
||||
<div class="wrap_bg">
|
||||
<!--榜单详情 start-->
|
||||
<div class="pad20">
|
||||
|
||||
<div class="book_tit">
|
||||
<div class="fl">
|
||||
<h3 class="font26 mt5 mb5">点击榜</h3>
|
||||
</div>
|
||||
<a class="fr"></a>
|
||||
</div>
|
||||
<div class="updateTable rankTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank">排名</th>
|
||||
<th class="style">类别</th>
|
||||
<th class="name">书名</th>
|
||||
<th class="chapter">最新章节</th>
|
||||
<th class="author">作者</th>
|
||||
<th class="word">字数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookRankList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<!--榜单详情 end-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="wrap_right fr">
|
||||
<div class="wrap_inner wrap_right_cont mb20">
|
||||
<div class="title cf noborder">
|
||||
<h3 class="on">排行榜</h3>
|
||||
</div>
|
||||
<div class="rightList2">
|
||||
<ul id="rankType">
|
||||
<li><a class="on" href="javascript:listRank(0)">点击榜</a></li>
|
||||
<li><a href="javascript:listRank(1)">新书榜</a></li>
|
||||
<li><a href="javascript:listRank(2)">更新榜</a></li>
|
||||
<li><a href="javascript:listRank(3)">评论榜</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
$("#rankType a").click(function () {
|
||||
$("#rankType .on").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
})
|
||||
|
||||
var rankType = getSearchString("type");
|
||||
if(rankType==undefined){
|
||||
rankType=0;
|
||||
}else{
|
||||
$("#rankType a").eq(rankType).click();
|
||||
}
|
||||
listRank(rankType);
|
||||
|
||||
function listRank(rankType){
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listRank",
|
||||
data: {'type':rankType,'limit':30},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookRankList = data.data;
|
||||
var bookRankListHtml = "";
|
||||
for(var i=0;i<bookRankList.length;i++){
|
||||
var book = bookRankList[i];
|
||||
var classHtml = "";
|
||||
if(i<3){
|
||||
classHtml="num"+(i+1);
|
||||
}
|
||||
bookRankListHtml+=("<tr>\n" +
|
||||
" <td class=\"rank\"><i class=\""+classHtml+"\">"+(i+1)+"</i></td>\n" +
|
||||
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a></td>\n" +
|
||||
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >"+book.bookName+"</a></td>\n" +
|
||||
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >"+book.lastIndexName+"</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"author\"><a href=\"javascript:void(0)\">"+book.authorName+"</a></td>\n" +
|
||||
" <td class=\"word\">"+(book.wordCount / 10000).toFixed(2)+"万</td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookRankList").html(bookRankListHtml);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
364
novel-front/src/main/resources/templates/book/bookclass.html
Normal file
364
novel-front/src/main/resources/templates/book/bookclass.html
Normal file
@ -0,0 +1,364 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'全部作品_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'。'"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div th:replace="common/top :: top('1')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="channelWrap classTable cf">
|
||||
<div class="so_tag">
|
||||
<ul class="list">
|
||||
<li class="so_pd" id="workDirection">
|
||||
<span class="tit">作品频道:</span>
|
||||
<a filter-value="0" href="javascript:listBookCategory();search(1,20)" class="on">男频</a>
|
||||
<a filter-value="1" href="javascript:listBookCategory();search(1,20)">女频</a>
|
||||
</li>
|
||||
<li id="idGirl" class="so_class">
|
||||
<span class="tit">作品分类:</span>
|
||||
<span class="so_girl" id="girlCategoryList" style="display: none;">
|
||||
</span>
|
||||
<span class="so_boy" id="boyCategoryList">
|
||||
</span>
|
||||
</li>
|
||||
<!-- <li class="so_free">
|
||||
<span class="tit">是否免费:</span>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=0&so=0&ms=2" class="on">不限</a>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=1&so=0&ms=2" class="">免费作品</a>
|
||||
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=2&so=0&ms=2" class="">收费作品</a>
|
||||
</li>-->
|
||||
<li class="so_progress">
|
||||
<span class="tit">是否完结:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="0" href="javascript:search(1,20)" class="">连载中</a>
|
||||
<a filter-value="1" href="javascript:search(1,20)" class="">已完结</a>
|
||||
</li>
|
||||
<li class="so_words">
|
||||
<span class="tit">作品字数:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value-max="300000" href="javascript:search(1,20)" class="">30万字以下</a>
|
||||
<a filter-value-min="300000" filter-value-max="500000" href="javascript:search(1,20)" class="">30-50万字</a>
|
||||
<a filter-value-min="500000" filter-value-max="1000000" href="javascript:search(1,20)" class="">50-100万字</a>
|
||||
<a filter-value-min="1000000" href="javascript:search(1,20)" class="">100万字以上</a>
|
||||
</li>
|
||||
<li class="so_update">
|
||||
<span class="tit">更新时间:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="3" href="javascript:search(1,20)" class="">三日内</a>
|
||||
<a filter-value="7" href="javascript:search(1,20)" class="">七日内</a>
|
||||
<a filter-value="15" href="javascript:search(1,20)" class="">半月内</a>
|
||||
<a filter-value="30" href="javascript:search(1,20)" class="">一月内</a>
|
||||
</li>
|
||||
<li class="so_sort">
|
||||
<span class="tit">排序方式:</span>
|
||||
<a href="javascript:search(1,20)" class="on">不限</a>
|
||||
<a filter-value="update_time" href="javascript:search(1,20)" class="">更新时间</a>
|
||||
<a filter-value="word_count" href="javascript:search(1,20)" class="">总字数</a>
|
||||
<a filter-value="visit_count" href="javascript:search(1,20)" class="">点击量</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="channelWrap channelClassContent cf">
|
||||
<div class="updateTable rankTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="rank">序号</th>
|
||||
<th class="style">类别</th>
|
||||
<th class="name">书名</th>
|
||||
<th class="chapter">最新章节</th>
|
||||
<th class="author">作者</th>
|
||||
<th class="word">字数</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="pageBox cf" id="books">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookclass.js" type="text/javascript"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
var workDirection;
|
||||
var catId = getSearchString('c');
|
||||
|
||||
listBookCategory(catId);
|
||||
|
||||
if(!catId){
|
||||
search(1, 20);
|
||||
}
|
||||
|
||||
function search(curr, limit) {
|
||||
var searchData = {};
|
||||
searchData.curr = curr;
|
||||
searchData.limit = limit;
|
||||
|
||||
searchData.keyword = $("#searchKey").val();
|
||||
var workDirection = $(".so_pd>.on").attr("filter-value");
|
||||
if(workDirection != undefined){
|
||||
searchData.workDirection = workDirection;
|
||||
}
|
||||
|
||||
if(workDirection == 1){
|
||||
var catId = $(".so_girl>.on").attr("filter-value");
|
||||
}else{
|
||||
var catId = $(".so_boy>.on").attr("filter-value");
|
||||
}
|
||||
|
||||
if(catId != undefined){
|
||||
searchData.catId = catId;
|
||||
}
|
||||
|
||||
var bookStatus = $(".so_progress>.on").attr("filter-value");
|
||||
if(bookStatus != undefined){
|
||||
searchData.bookStatus = bookStatus;
|
||||
}
|
||||
|
||||
var wordCountMin = $(".so_words>.on").attr("filter-value-min");
|
||||
if(wordCountMin != undefined){
|
||||
searchData.wordCountMin = wordCountMin;
|
||||
}
|
||||
|
||||
var wordCountMax = $(".so_words>.on").attr("filter-value-max");
|
||||
if(wordCountMax != undefined){
|
||||
searchData.wordCountMax = wordCountMax;
|
||||
}
|
||||
|
||||
var updatePeriod = $(".so_update>.on").attr("filter-value");
|
||||
if(updatePeriod != undefined){
|
||||
searchData.updatePeriod = updatePeriod;
|
||||
}
|
||||
|
||||
var sort = $(".so_sort>.on").attr("filter-value");
|
||||
if(sort != undefined){
|
||||
searchData.sort = sort;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/searchByPage",
|
||||
data: searchData,
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookList = data.data.list;
|
||||
var bookListHtml = "";
|
||||
for (var i = 0; i < bookList.length; i++) {
|
||||
var book = bookList[i];
|
||||
var wordCount = (book.wordCount / 10000).toFixed(2);
|
||||
bookListHtml += (" <tr>\n" +
|
||||
" <td class=\"rank\"><i>" + (i + 1) + "</i></td>\n" +
|
||||
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" cls=\"13\">[" + book.catName + "]</a></td>\n" +
|
||||
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >" + book.bookName + "</a></td>\n" +
|
||||
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >" + book.lastIndexName + "</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"author\"><a href=\"javascript:void(0)\">" + book.authorName + "</a></td>\n" +
|
||||
" <td class=\"word\">" + wordCount + "万</td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookList").html(bookListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'books' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
function listBookCategory(c) {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listBookCategory",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var categoryList = data.data;
|
||||
var boyCategoryListHtml = "";
|
||||
boyCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
|
||||
var girlCategoryListHtml = "";
|
||||
girlCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
|
||||
for (var i = 0; i < categoryList.length; i++) {
|
||||
var category = categoryList[i];
|
||||
if (category.workDirection == 1) {
|
||||
if(category.id==c){
|
||||
workDirection = 1;
|
||||
}
|
||||
girlCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
|
||||
} else {
|
||||
if(category.id==c){
|
||||
workDirection = 0;
|
||||
}
|
||||
boyCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
|
||||
}
|
||||
}
|
||||
$("#boyCategoryList").html(boyCategoryListHtml);
|
||||
$("#girlCategoryList").html(girlCategoryListHtml);
|
||||
$(".so_girl a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_girl>.on").removeClass("on");
|
||||
$(".so_girl a").eq(index).addClass("on");
|
||||
})
|
||||
$(".so_boy a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_boy>.on").removeClass("on");
|
||||
$(".so_boy>.on").removeClass("on");
|
||||
$(".so_boy a").eq(index).addClass("on");
|
||||
})
|
||||
if(c) {
|
||||
if (workDirection === 1) {
|
||||
$(".so_pd a").eq(1).click();
|
||||
$("#girlCategoryList a[filter-value=" + c + "]").click();
|
||||
} else {
|
||||
$("#boyCategoryList a[filter-value=" + c + "]").click();
|
||||
}
|
||||
search(1, 20);
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function () {
|
||||
$(".so_pd a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_pd>.on").removeClass("on");
|
||||
if (index == 2) {
|
||||
$(".so_pd a").eq(1).addClass("on");
|
||||
$(".so_girl").show();
|
||||
$(".so_boy").hide();
|
||||
} else {
|
||||
$(".so_pd a").eq(0).addClass("on");
|
||||
$(".so_girl").hide();
|
||||
$(".so_boy").show();
|
||||
}
|
||||
})
|
||||
$(".so_progress a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_progress>.on").removeClass("on");
|
||||
$(".so_progress>.on").removeClass("on");
|
||||
$(".so_progress a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_words a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_words>.on").removeClass("on");
|
||||
$(".so_words>.on").removeClass("on");
|
||||
$(".so_words a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_update a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_update>.on").removeClass("on");
|
||||
$(".so_update>.on").removeClass("on");
|
||||
$(".so_update a").eq(index-1).addClass("on");
|
||||
})
|
||||
$(".so_sort a").click(function () {
|
||||
var index = $(this).index();
|
||||
console.log(index);
|
||||
$(".so_sort>.on").removeClass("on");
|
||||
$(".so_sort>.on").removeClass("on");
|
||||
$(".so_sort a").eq(index-1).addClass("on");
|
||||
})
|
||||
|
||||
|
||||
$(".style a").each(function () {
|
||||
var bId = $(this).attr("cls");
|
||||
if (bId > 0) {
|
||||
$(this).html("[" + getBName(bId) + "]");
|
||||
}
|
||||
});
|
||||
|
||||
if (2 == 1) {
|
||||
$(".so_pd>.on").removeClass("on");
|
||||
$(".so_pd a").eq(1).addClass("on");
|
||||
$(".so_girl").hide();
|
||||
$(".so_boy").show();
|
||||
}
|
||||
});
|
||||
|
||||
function getBName(bId) {
|
||||
for (var i = 0; i < bClass.rows.length; i++) {
|
||||
if (bId == bClass.rows[i].BId) {
|
||||
return bClass.rows[i].Name;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
11
novel-front/src/main/resources/templates/common/footer.html
Normal file
11
novel-front/src/main/resources/templates/common/footer.html
Normal file
@ -0,0 +1,11 @@
|
||||
<div th:fragment="footer" class="footer">
|
||||
<div class="box_center cf">
|
||||
<div class="copyright">
|
||||
<ul >
|
||||
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i class="line">|</i><a href="/about/default.html" >关于我们</a><i class="line">|</i><a href="/about/contact.html" >联系我们</a><i class="line">|</i><a href="/user/feedback.html" >反馈留言</a><i class="line">|</i><a href="javascript:layer.alert('待开通,敬请期待!');" >作家专区</a></li>
|
||||
<li th:text="'Copyright (C) '+#{website.domain}+' All rights reserved '+#{website.name}+'版权所有'"></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
14
novel-front/src/main/resources/templates/common/header.html
Normal file
14
novel-front/src/main/resources/templates/common/header.html
Normal file
@ -0,0 +1,14 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head th:fragment="common_head(title,meta,links)">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<title th:replace="${title}">小说精品屋</title>
|
||||
<link rel="stylesheet" href="/css/base.css?v=1"/>
|
||||
<th:block th:replace="${meta}"/>
|
||||
<th:block th:replace="${links}"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
4
novel-front/src/main/resources/templates/common/js.html
Normal file
4
novel-front/src/main/resources/templates/common/js.html
Normal file
@ -0,0 +1,4 @@
|
||||
<script th:fragment="js" src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
|
||||
<script th:fragment="js" src="/layui/layui.all.js" type="text/javascript"></script>
|
||||
<script th:fragment="js" src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script th:fragment="js" src="/javascript/common.js" type="text/javascript"></script>
|
51
novel-front/src/main/resources/templates/common/top.html
Normal file
51
novel-front/src/main/resources/templates/common/top.html
Normal file
@ -0,0 +1,51 @@
|
||||
<div th:fragment="top(navType)" class="header">
|
||||
<div class="topBar" style="display: none">
|
||||
<div class="box_center cf">
|
||||
<div class="top_l">
|
||||
<a href="/" class="on" th:text="#{website.name}"></a><i class="line">|</i><a
|
||||
href="/?m=2">手机女生版</a><i class="line">|</i><a
|
||||
href="/?m=1">手机男生版</a><i class="line">|</i><a
|
||||
href="/">客户端下载</a>
|
||||
</div>
|
||||
<div class="top_r">
|
||||
<div class="top_nearread">
|
||||
<a href="javascript:void(0);" class="nearread" id="headerUserHistoryBtn">最近阅读<i
|
||||
class="icon_down"></i></a>
|
||||
<div class="book_record" style="display:none" id="headerUserHistory">
|
||||
</div>
|
||||
</div>
|
||||
<span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="topMain">
|
||||
<div class="box_center cf">
|
||||
<a href="/?m=2" class="logo fl"><img src="/images/logo.png" th:alt="#{website.name}"/></a>
|
||||
<div class="searchBar fl">
|
||||
<div class="search cf">
|
||||
<input type="text" placeholder="书名、作者、关键字" class="s_int" name="searchKey" id="searchKey"/>
|
||||
<label class="search_btn" id="btnSearch" onclick="searchByK()"><i class="icon"></i></label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bookShelf fr" id="headerUserInfo">
|
||||
<a class="sj_link" href="/user/favorites.html">我的书架</a>
|
||||
<span class="user_link"><i class="line mr20">|</i><a href="/user/login.html" class="mr15">登录</a><a
|
||||
href="/user/register.html">注册</a></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mainNav" id="mainNav" th:style="${navType} == 10?'display:none':''">
|
||||
<div class="box_center cf" >
|
||||
<ul class="nav" id="navModule">
|
||||
|
||||
<li th:class="${navType}==0?'on':''"><a href="/">首页</a></li>
|
||||
<li th:class="${navType}==1?'on':''"><a href="/book/bookclass.html">全部作品</a></li>
|
||||
<li th:class="${navType}==2?'on':''"><a href="/book/book_ranking.html">排行榜</a></li>
|
||||
<li class=""><a href="javascript:layer.alert('待开通,敬请期待!');">充值</a></li>
|
||||
<li><a href="javascript:layer.alert('待开通,敬请期待!');">作家专区</a></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
543
novel-front/src/main/resources/templates/index.html
Normal file
543
novel-front/src/main/resources/templates/index.html
Normal file
@ -0,0 +1,543 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="#{website.name}+'_原创小说网站'"></title>
|
||||
<meta name="keywords" th:content="#{website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'。'"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
|
||||
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
|
||||
<link rel="stylesheet" href="/css/main.css"/>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div th:replace="common/top :: top('0')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="channelWrap channelBanner cf">
|
||||
<div class="leftBox">
|
||||
<div class="sliderContent">
|
||||
<dl class="scBigImg" id="carouseBig">
|
||||
</dl>
|
||||
<div class="scSmallImg" id="carouseSmall">
|
||||
<ul>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hot_articles">
|
||||
<dl class="hot_recommend" id="topBooks1">
|
||||
</dl>
|
||||
<dl class="hot_recommend" id="topBooks2">
|
||||
</dl>
|
||||
<dl class="hot_notice" id="indexNews">
|
||||
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
<div class="rightBox">
|
||||
<div class="title cf" id="weekcommend">
|
||||
<h3>本周强推</h3>
|
||||
</div>
|
||||
<div class="rightList">
|
||||
<ul id="currentWeek">
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="channelWrap channelPic cf">
|
||||
<div class="leftBox">
|
||||
<div class="title">
|
||||
<h2 class="on">热门推荐</h2>
|
||||
</div>
|
||||
<div class="picRecommend cf" id="hotRecBooks">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="bookrank1_ShowBookRank">
|
||||
<div class="rightBox ">
|
||||
<div class="title cf">
|
||||
<h3 class="on">点击榜单</h3>
|
||||
</div>
|
||||
<div class="rightList">
|
||||
<ul id="clickRankBooks">
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="more"><a href="/book/book_ranking.html">查看更多></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="channelWrap channelPic cf">
|
||||
<div class="leftBox">
|
||||
<div class="title">
|
||||
<h2>精品推荐</h2>
|
||||
</div>
|
||||
<div class="picRecommend cf" id="classicBooks">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="bookrank2_ShowBookRank">
|
||||
<div class="rightBox ">
|
||||
<div class="title cf">
|
||||
<h3 class="on">新书榜单</h3>
|
||||
</div>
|
||||
<div class="rightList">
|
||||
<ul id="newRankBooks">
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="more"><a href="/book/book_ranking.html?type=1">查看更多></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="channelWrap channelTable cf">
|
||||
<div class="leftBox">
|
||||
<div class="title">
|
||||
<h2>最新更新</h2>
|
||||
</div>
|
||||
<div class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="style">类别</th>
|
||||
<th class="name">书名</th>
|
||||
<th class="chapter">最新章节</th>
|
||||
<th class="author">作者</th>
|
||||
<th class="time">更新时间</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="newRankBooks2">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div id="bookrank5_ShowBookRank">
|
||||
<div class="rightBox mb20">
|
||||
<div class="title cf">
|
||||
<h3 class="on">更新榜单</h3>
|
||||
</div>
|
||||
<div class="rightList">
|
||||
<ul id="updateRankBooks">
|
||||
|
||||
|
||||
</ul>
|
||||
<div class="more"><a href="/book/book_ranking.html?type=2">查看更多></a></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="friend_link" >
|
||||
<div class="box_center cf" id="friendLink">
|
||||
<span>友情链接:</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/header.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$(function () {
|
||||
//加载首页书籍设置数据
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listBookSetting",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
//轮播图设置
|
||||
var carouselBooks = data.data[0];
|
||||
var carouseBigHtml = "";
|
||||
var carouseSmallHtml = "";
|
||||
for (var i = 0; i < carouselBooks.length; i++) {
|
||||
var carouselBook = carouselBooks[i];
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
carouseBigHtml += ("<dd class=\"" + classHtml + "\"><a href=\"/book/"+carouselBook.bookId+".html\">" +
|
||||
"<img src=\"" + carouselBook.picUrl + "\" alt=\"" + carouselBook.bookName + "\"/></a></dd>");
|
||||
|
||||
carouseSmallHtml += " <li class=\"" + classHtml + "\">" +
|
||||
"<img src=\"" + carouselBook.picUrl + "\" alt=\"" + carouselBook.bookName + "\"/></li>";
|
||||
|
||||
|
||||
}
|
||||
$("#carouseBig").html(carouseBigHtml);
|
||||
$("#carouseSmall").html(carouseSmallHtml);
|
||||
var $div = $('.scBigImg dl');//放置大图容器
|
||||
var $nav = $('.scSmallImg li');//放置缩略图容器
|
||||
var num = -1;
|
||||
var open;
|
||||
|
||||
function changeKv() {
|
||||
if (num >= $nav.length - 1) {
|
||||
num = 0;
|
||||
} else {
|
||||
num++;
|
||||
}
|
||||
$nav.eq(num).trigger('mouseenter');
|
||||
open = setTimeout(changeKv, 3000);
|
||||
}
|
||||
|
||||
changeKv();
|
||||
$nav.each(function (index) {
|
||||
$(this).off('mouseenter').on('mouseenter', function () {
|
||||
clearTimeout(open);
|
||||
|
||||
$(this).addClass('on').siblings().removeClass('on');
|
||||
$('.scBigImg dd').eq(index).addClass('on').siblings().removeClass('on');
|
||||
$('.scSmallImg').off('mouseleave').on('mouseleave', function () {
|
||||
num = index;
|
||||
setTimeout(function () {
|
||||
changeKv();
|
||||
}, 3000)
|
||||
})
|
||||
});
|
||||
});
|
||||
$div.each(function (index) {
|
||||
$(this).off('mouseenter').on('mouseenter', function () {
|
||||
clearTimeout(open);
|
||||
});
|
||||
});
|
||||
//顶部小说栏设置
|
||||
var topBooks = data.data[1];
|
||||
var topBooks1Html = "";
|
||||
var topBooks2Html = "";
|
||||
for (var i = 0; i < topBooks.length; i++) {
|
||||
var toBook = topBooks[i];
|
||||
if (i < 5) {
|
||||
if (i == 0) {
|
||||
topBooks1Html += "<dt>";
|
||||
} else if (i % 2 == 1) {
|
||||
topBooks1Html += "<dd>";
|
||||
}
|
||||
topBooks1Html += ("<a href=\"book/"+toBook.bookId+".html\">" + toBook.bookName + "</a>");
|
||||
if (i == 0) {
|
||||
topBooks1Html += "</dt>";
|
||||
} else if (i % 2 == 0) {
|
||||
topBooks1Html += "</dd>";
|
||||
}
|
||||
|
||||
} else {
|
||||
if (i == 5) {
|
||||
topBooks2Html += "<dt>";
|
||||
} else if (i % 2 == 0) {
|
||||
topBooks2Html += "<dd>";
|
||||
}
|
||||
topBooks2Html += ("<a href=\"book/"+toBook.bookId+".html\">" + toBook.bookName + "</a>");
|
||||
if (i == 5) {
|
||||
topBooks2Html += "</dt>";
|
||||
} else if (i % 2 == 1) {
|
||||
topBooks2Html += "</dd>";
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
$("#topBooks1").html(topBooks1Html);
|
||||
$("#topBooks2").html(topBooks2Html);
|
||||
|
||||
//本周强推
|
||||
var rightListBooks = data.data[2];
|
||||
var rightListBooksHtml = "";
|
||||
for (var i = 0; i < rightListBooks.length; i++) {
|
||||
var rightListBook = rightListBooks[i];
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
if (i < 3) {
|
||||
classHtml += (" num" + (i + 1));
|
||||
}
|
||||
rightListBooksHtml += ("<li class=\"" + classHtml + "\">\n" +
|
||||
" <div class=\"book_name\"><i>" + (i + 1) + "</i><a class=\"name\" href=\"/book/"+rightListBook.bookId+".html\">" + rightListBook.bookName + "</a></div>\n" +
|
||||
" <div class=\"book_intro\">\n" +
|
||||
" <div class=\"cover\"><a href=\"/book/"+rightListBook.bookId+".html\"><img\n" +
|
||||
" src=\"" + rightListBook.picUrl + "\" alt=\"" + rightListBook.bookName + "\"/></a>\n" +
|
||||
" </div>\n" +
|
||||
" <a class=\"txt\" href=\"/book/"+rightListBook.bookId+".html\">" + rightListBook.bookDesc + "</a>\n" +
|
||||
" </div>\n" +
|
||||
" </li>");
|
||||
}
|
||||
$("#currentWeek").html(rightListBooksHtml);
|
||||
|
||||
//热门推荐
|
||||
var hotRecBooks = data.data[3];
|
||||
var hotRecBooksHtml = "";
|
||||
for (var i = 0; i < hotRecBooks.length; i++) {
|
||||
var hotRecBook = hotRecBooks[i];
|
||||
hotRecBooksHtml += (" <div class=\"itemsList\">\n" +
|
||||
" <a class=\"items_img\" href=\"/book/"+hotRecBook.bookId+".html\">\n" +
|
||||
" <img src=\"" + hotRecBook.picUrl + "\" alt=\"" + hotRecBook.bookName + "\"/>\n" +
|
||||
" </a>\n" +
|
||||
" <div class=\"items_txt\">\n" +
|
||||
" <h4><a href=\"/book/"+hotRecBook.bookId+".html\">" + hotRecBook.bookName + "</a></h4>\n" +
|
||||
" <p class=\"author\"><a href=\"javascript:void(0)\">作者:" + hotRecBook.authorName + "</a></p>\n" +
|
||||
" <p class=\"intro\"><a href=\"/book/"+hotRecBook.bookId+".html\">" + hotRecBook.bookDesc + "</a>\n" +
|
||||
" </p>\n" +
|
||||
" </div>\n" +
|
||||
" </div>");
|
||||
}
|
||||
$("#hotRecBooks").html(hotRecBooksHtml);
|
||||
|
||||
//精品推荐
|
||||
var classicBooks = data.data[4];
|
||||
var classicBooksHtml = "";
|
||||
for (var i = 0; i < classicBooks.length; i++) {
|
||||
var classicBook = classicBooks[i];
|
||||
classicBooksHtml += (" <div class=\"itemsList\">\n" +
|
||||
" <a class=\"items_img\" href=\"/book/"+classicBook.bookId+".html\">\n" +
|
||||
" <img src=\"" + classicBook.picUrl + "\" alt=\"" + classicBook.bookName + "\"/>\n" +
|
||||
" </a>\n" +
|
||||
" <div class=\"items_txt\">\n" +
|
||||
" <h4><a href=\"/book/"+classicBook.bookId+".html\">" + classicBook.bookName + "</a></h4>\n" +
|
||||
" <p class=\"author\"><a href=\"javascript:void(0)\">作者:" + classicBook.authorName + "</a></p>\n" +
|
||||
" <p class=\"intro\"><a href=\"/book/"+classicBook.bookId+".html\">" + classicBook.bookDesc + "</a>\n" +
|
||||
" </p>\n" +
|
||||
" </div>\n" +
|
||||
" </div>");
|
||||
|
||||
}
|
||||
$("#classicBooks").html(classicBooksHtml);
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
//首页新闻查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/news/listIndexNews",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var indexNewsList = data.data;
|
||||
var indexNewsHtml = "";
|
||||
for (var i = 0; i < indexNewsList.length; i++) {
|
||||
var indexNews = indexNewsList[i];
|
||||
indexNewsHtml += ("<dd style=\"text-align:left;\"><span>[" + indexNews.catName + "]</span><a\n" +
|
||||
" href=\"/about/newsInfo-"+indexNews.id+".html\">" + indexNews.title + "</a>\n" +
|
||||
" </dd>");
|
||||
}
|
||||
$("#indexNews").html(indexNewsHtml);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//点击榜单数据查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listClickRank",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var clickRankBooks = data.data;
|
||||
var clickRankBooksHtml = "";
|
||||
for (var i = 0; i < clickRankBooks.length; i++) {
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
if (i < 3) {
|
||||
classHtml += (" num" + (i + 1));
|
||||
}
|
||||
var clickRankBook = clickRankBooks[i];
|
||||
clickRankBooksHtml += ("<li class=\"" + classHtml + "\">\n" +
|
||||
" <div class=\"book_name\">\n" +
|
||||
" <i>" + (i + 1) + "</i><a class=\"name\" href=\"/book/"+clickRankBook.id+".html\">" + clickRankBook.bookName + "</a>\n" +
|
||||
" </div>\n" +
|
||||
" <div class=\"book_intro\">\n" +
|
||||
" <div class=\"cover\">\n" +
|
||||
" <a href=\"book/"+clickRankBook.id+".html\"><img src=\"" + clickRankBook.picUrl + "\"\n" +
|
||||
" alt=\"" + clickRankBook.bookName + "\"/></a>\n" +
|
||||
" </div>\n" +
|
||||
" <a class=\"txt\" href=\"/book/"+clickRankBook.id+".html\">" + clickRankBook.bookDesc + "</a>\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </li>");
|
||||
}
|
||||
$("#clickRankBooks").html(clickRankBooksHtml);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
//新书榜单查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listNewRank",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var newRankBooks = data.data;
|
||||
var newRankBooksHtml = "";
|
||||
for (var i = 0; i < newRankBooks.length; i++) {
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
if (i < 3) {
|
||||
classHtml += (" num" + (i + 1));
|
||||
}
|
||||
var newRankBook = newRankBooks[i];
|
||||
newRankBooksHtml += ("<li class=\"" + classHtml + "\">\n" +
|
||||
" <div class=\"book_name\">\n" +
|
||||
" <i>" + (i + 1) + "</i><a class=\"name\" href=\"/book/"+newRankBook.id+".html\">" + newRankBook.bookName + "</a>\n" +
|
||||
" </div>\n" +
|
||||
" <div class=\"book_intro\">\n" +
|
||||
" <div class=\"cover\">\n" +
|
||||
" <a href=\"book/"+newRankBook.id+".html\"><img\n" +
|
||||
" src=\"" + newRankBook.picUrl + "\"\n" +
|
||||
" alt=\"" + newRankBook.bookName + "\"/></a>\n" +
|
||||
" </div>\n" +
|
||||
" <a class=\"txt\" href=\"/book/"+newRankBook.id+".html\">" + newRankBook.bookDesc + "</a>\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </li>");
|
||||
}
|
||||
$("#newRankBooks").html(newRankBooksHtml);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
//更新榜单查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/listUpdateRank",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var updateRankBooks = data.data;
|
||||
var updateRankBookHtml = "";
|
||||
var updateRankBookHtml2 = "";
|
||||
for (var i = 0; i < updateRankBooks.length; i++) {
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
if (i < 3) {
|
||||
classHtml += (" num" + (i + 1));
|
||||
}
|
||||
var updateRankBook = updateRankBooks[i];
|
||||
if (i < 10) {
|
||||
updateRankBookHtml += ("<li class=\"" + classHtml + "\">\n" +
|
||||
" <div class=\"book_name\">\n" +
|
||||
" <i>" + (i + 1) + "</i><a class=\"name\" href=\"/book/"+updateRankBook.id+".html\">" + updateRankBook.bookName + "</a>\n" +
|
||||
" </div>\n" +
|
||||
" <div class=\"book_intro\">\n" +
|
||||
" <div class=\"cover\">\n" +
|
||||
" <a href=\"book/"+updateRankBook.id+".html\"><img\n" +
|
||||
" src=\"" + updateRankBook.picUrl + "\"\n" +
|
||||
" alt=\"" + updateRankBook.bookName + "\"/></a>\n" +
|
||||
" </div>\n" +
|
||||
" <a class=\"txt\" href=\"/book/"+updateRankBook.id+".html\">" + updateRankBook.bookDesc + "</a>\n" +
|
||||
" </div>\n" +
|
||||
"\n" +
|
||||
" </li>");
|
||||
}
|
||||
updateRankBookHtml2 += ("<tr>\n" +
|
||||
" <td class=\"style\"><a href=\"book/bookclass.html?c="+updateRankBook.catId+"\">[" + updateRankBook.catName + "]</a></td>\n" +
|
||||
" <td class=\"name\"><a href=\"/book/"+updateRankBook.id+".html\">" + updateRankBook.bookName + "</a></td>\n" +
|
||||
" <td class=\"chapter\"><a href=\"/book/"+updateRankBook.id+".html\">" + updateRankBook.lastIndexName + "</a>\n" +
|
||||
" <i class=\"\"></i>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"author\"><a href=\"javascript:void(0)\">" + updateRankBook.authorName + "</a></td>\n" +
|
||||
" <td class=\"time\">" + updateRankBook.lastIndexUpdateTime + "</td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#updateRankBooks").html(updateRankBookHtml);
|
||||
$("#newRankBooks2").html(updateRankBookHtml2);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
}
|
||||
,
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
//友情链接查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/friendLink/listIndexLink",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var friendLinkList = data.data;
|
||||
var friendLinkHtml = "";
|
||||
for (var i = 0; i < friendLinkList.length; i++) {
|
||||
var friendLink = friendLinkList[i];
|
||||
friendLinkHtml += ("<a target='_blank' href=\""+friendLink.linkUrl+"\">"+friendLink.linkName+"</a>");
|
||||
}
|
||||
$("#friendLink").append(friendLinkHtml);
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
$("#weekcommend h3").mouseover(function () {
|
||||
$("#weekcommend h3").removeClass("on");
|
||||
$(this).addClass("on");
|
||||
if ($(this).attr("class").indexOf("fr") >= 0) {
|
||||
$("#currentWeek").hide();
|
||||
$("#currentPreWeek").show();
|
||||
} else {
|
||||
$("#currentPreWeek").hide();
|
||||
$("#currentWeek").show();
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</html>
|
@ -0,0 +1,520 @@
|
||||
<!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>天女商妃第1章 揍个天花乱坠</title>
|
||||
|
||||
<meta name="keywords" th:content="#{website.name}+','+${bookIndex.indexName}">
|
||||
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+${bookIndex.indexName}+'最新更新章节免费在线阅读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>
|
||||
<script>
|
||||
var isShowKey = "isShowKey";
|
||||
// 弹幕定时器
|
||||
var timers = [];
|
||||
|
||||
|
||||
function showOrHiddenBullet() {
|
||||
var isShow = eval(localStorage.getItem(isShowKey));//eval方法动态将参数运算成一个字符串,然后自动判断了字符串的类型,true被认为是boolean类型的变量.javascript的弱类型机制.通过eval运算可以动态获取运算后参数的类型.
|
||||
if (isShow) {
|
||||
$(".bullet").css("display", "none");
|
||||
$(".screen_toolbar").css("display", "none");
|
||||
$("[lay-skin='_switch']").removeClass("layui-form-onswitch");
|
||||
localStorage.setItem(isShowKey, false);
|
||||
$(".bullet").remove();
|
||||
setTimeout(function () {
|
||||
$(".bullet").remove();
|
||||
},1000)
|
||||
} else {
|
||||
$(".bullet").css("display", "block");
|
||||
$(".screen_toolbar").css("display", "block");
|
||||
$("[lay-skin='_switch']").addClass("layui-form-onswitch");
|
||||
localStorage.setItem(isShowKey, true);
|
||||
loadBullet();
|
||||
}
|
||||
}
|
||||
|
||||
// 新建一个弹幕
|
||||
function createScreenbullet(text) {
|
||||
var jqueryDom = $("<div class='bullet'>" + text + "</div>");
|
||||
var fontColor = "rgb(" + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random() * 256) + "," + Math.floor(Math.random()) + ")";
|
||||
var fontSize = Math.floor((Math.random() + 1) * 18) + "px";
|
||||
var left = $(".screen_container").width() + "px";
|
||||
var windowHeight = $(window).height();
|
||||
var top = windowHeight/2 + Math.floor(Math.random() * (windowHeight/2-100));
|
||||
//top = parseInt(top) > windowHeight - 100 ? (windowHeight - 100) + "px" : top + "px";
|
||||
jqueryDom.css({
|
||||
"position": 'fixed',
|
||||
"color": fontColor,
|
||||
"font-size": fontSize,
|
||||
"left": left,
|
||||
"top": top
|
||||
});
|
||||
$(".screen_container").append(jqueryDom);
|
||||
return jqueryDom;
|
||||
}
|
||||
|
||||
// 为弹幕添加定时任务
|
||||
function addInterval(jqueryDom) {
|
||||
var left = jqueryDom.offset().left - $(".screen_container").offset().left;
|
||||
var timer = setInterval(function () {
|
||||
left--;
|
||||
jqueryDom.css("left", left + "px");
|
||||
if (jqueryDom.offset().left + jqueryDom.width() < $(".screen_container").offset().left) {
|
||||
jqueryDom.remove();
|
||||
clearInterval(timer);
|
||||
}
|
||||
}, 10);
|
||||
timers.push(timer);
|
||||
}
|
||||
|
||||
function loadBullet() {
|
||||
var contentId = $("#contentIdHidden").val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/queryBullet",
|
||||
contentType: 'application/x-www-form-urlencoded;charset=utf-8',
|
||||
data: {contentId: contentId},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
var lastCreateTime ;
|
||||
var currentCreateTime;
|
||||
|
||||
var i = 0;
|
||||
var sllepTime = 0;
|
||||
if(data.length>0){
|
||||
var schedule = setInterval(function () {
|
||||
if(!eval(localStorage.getItem(isShowKey))){
|
||||
clearInterval(schedule);
|
||||
}
|
||||
if(data.length>i) {
|
||||
currentCreateTime = new Date(data[i].createTime).getTime();
|
||||
if (lastCreateTime && currentCreateTime - lastCreateTime > 60000 && sllepTime <= 3000) {
|
||||
if (sllepTime == 3000) {
|
||||
lastCreateTime = currentCreateTime;
|
||||
}
|
||||
sllepTime += 3000;
|
||||
} else {
|
||||
sllepTime = 0;
|
||||
var bullet = data[i].screenBullet;
|
||||
// 创建弹幕
|
||||
var jqueryDom = createScreenbullet(bullet);
|
||||
// 添加定时任务
|
||||
addInterval(jqueryDom);
|
||||
i++;
|
||||
lastCreateTime = currentCreateTime;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}, 1000);
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
layer.alert("加载弹幕失败");
|
||||
return;
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
$(function () {
|
||||
// 控制弹幕显隐变量
|
||||
//监听键盘事件
|
||||
$("#screenBulletText").keypress(function (even) {
|
||||
if (even.which == 13) {
|
||||
//enter键按下
|
||||
sendBullet();
|
||||
}
|
||||
});
|
||||
// 监听发送按钮
|
||||
$(".send").on("click", function () {
|
||||
sendBullet();
|
||||
});
|
||||
// 监听关闭弹幕按钮
|
||||
$("[lay-skin='_switch']").click(function () {
|
||||
showOrHiddenBullet();
|
||||
});
|
||||
var isShow = eval(localStorage.getItem(isShowKey));
|
||||
if(isShow == undefined){
|
||||
isShow = true;//第一次使用,默认开启屏幕
|
||||
layer.open({
|
||||
content: '是否需要关闭小说弹幕,之后可通过右下角开关打开!'
|
||||
,btn: ['是', '否']
|
||||
,btn1: function(index, layero){
|
||||
showOrHiddenBullet();
|
||||
layer.close(index);
|
||||
}
|
||||
,btn2: function(index, layero){
|
||||
//按钮【按钮二】的回调
|
||||
|
||||
//return false 开启该代码可禁止点击该按钮关闭
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
localStorage.setItem(isShowKey, !isShow);
|
||||
// showOrHiddenBullet();
|
||||
|
||||
|
||||
});
|
||||
|
||||
function sleep(n) {
|
||||
|
||||
var start = new Date().getTime();
|
||||
|
||||
while(true) if(new Date().getTime()-start > n) break;
|
||||
|
||||
}
|
||||
//发送弹幕
|
||||
function sendBullet(){
|
||||
var bullet = $("#screenBulletText").val().replace(/</g, "<").replace(/>/g, ">");
|
||||
var contentId = $("#contentIdHidden").val();
|
||||
if (bullet && contentId) {
|
||||
if(bullet.length > 100){
|
||||
layer.alert("发送内容过长");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/book/sendBullet",
|
||||
contentType: 'application/x-www-form-urlencoded;charset=utf-8',
|
||||
data: {contentId: contentId, bullet: bullet},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
console.log(data);
|
||||
var bullet = $("#screenBulletText").val("")
|
||||
},
|
||||
error: function (e) {
|
||||
console.log(e);
|
||||
layer.alert("发送失败");
|
||||
return;
|
||||
}
|
||||
});
|
||||
} else {
|
||||
layer.alert("发送内容不能为空");
|
||||
return;
|
||||
}
|
||||
// 创建弹幕
|
||||
var jqueryDom = createScreenbullet(bullet);
|
||||
// 添加定时任务
|
||||
addInterval(jqueryDom);
|
||||
}
|
||||
</script>
|
||||
|
||||
<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="contentIdHidden" th:value="${bookContent.id}"/>
|
||||
|
||||
<input type="hidden" id="indexNumHidden" th:value="${bookIndex.indexNum}"/>
|
||||
|
||||
<script>
|
||||
var token = localStorage.getItem("token");
|
||||
$.get("/book/addVisit", {"bookId": $("#bookIdHidden").val(),"indexNum":$("#indexNumHidden").val(),"token":token}, function () {
|
||||
});
|
||||
</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: #92B8B1;" 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:text="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
|
||||
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
|
||||
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon"></i>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<p class="Readpage" style="background:#FFFFFF;padding:2px;">
|
||||
<a id="lightdiv" class="button lighton" 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 th:href="'/book/'+${book.id}+'/'+${preBookIndexId}+'.html'">上一章</a>
|
||||
<a th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
|
||||
<a th:href="'/book/'+${book.id}+'/'+${nextBookIndexId}+'.html'">下一章</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: 25px;">
|
||||
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >
|
||||
<span
|
||||
th:utext="${bookContent.content}"></span></p>
|
||||
</div>
|
||||
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
|
||||
|
||||
<a th:href="'/book/'+${book.id}+'/'+${preBookIndexId}+'.html'">上一章</a>
|
||||
<a th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
|
||||
<a th:href="'/book/'+${book.id}+'/'+${nextBookIndexId}+'.html'">下一章</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";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
</html>
|
@ -0,0 +1,356 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<title th:text="#{website.name}+'小说最新章节免费阅读和下载'"></title>
|
||||
|
||||
<meta name="keywords" th:content="#{website.name}+','+#{website.name}+'最新章节,'+#{website.name}+'免费阅读,'+#{website.name}+'TXT下载'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'最新章节列表,'+#{website.name}+'最新更新章节免费无广告无弹窗在线阅读,'+#{website.name}+'小说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>
|
||||
|
||||
<script src="/js/wap_collect.js"></script>
|
||||
|
||||
</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: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<b class="layui-icon" th:text="${book.bookName}"></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 class="layui-row" style="background: #f2f2f2">
|
||||
<div style="padding: 10px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
|
||||
<img style=" width:auto; height:auto; max-width:100%; max-height:100%;" th:src="${book.picUrl}"/>
|
||||
|
||||
</div>
|
||||
<div style="position:relative;padding: 10px 20px" class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
|
||||
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'"><div style=";color: #4c6978;" th:text="'作者:'+ ${book.authorName}"></div></a>
|
||||
<a th:href="'/book/book_ranking.html?catId='+${book.catId}"><div style="margin-top: 5px;color: #4c6978;" th:text="'类别:'+ ${book.catName}"></div></a>
|
||||
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态:'+ ${book.bookStatus==0?'连载':'完结'}"></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">评分:<i style="font-weight:bold;color: red" th:text="${book.score} + '分'"></i></div>
|
||||
<div style="margin-top: 5px;color: #4c6978;">点击:<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" class="layui-btn layui-btn-sm layui-btn-radius">开始阅读</a>
|
||||
<button type="button" id="cFavs" onclick="addInShell()" class="layui-btn layui-btn-sm layui-btn-radius layui-btn-warm">加入书架</button>
|
||||
|
||||
<button type="button" onclick="location.href='/user/favorites.html'" class="layui-btn layui-btn-sm layui-btn-radius layui-bg-cyan">我的书架</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: #4c6978;" 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: "POST",
|
||||
url: "/user/queryIsInShelf",
|
||||
data: {'bookId': $("#bookIdHidden").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if (data.data) {
|
||||
$("#cFavs").html("<button type=\"button\" id=\"cFavs\" 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: "POST",
|
||||
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\">"+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").html("<button type=\"button\" id=\"cFavs\" 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;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
$.get("/book/addVisitCount",{"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";
|
||||
}
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
@ -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:text="#{website.name}+'最新免费章节目录列表'"></title>
|
||||
|
||||
<meta name="keywords" th:content="#{website.name}+','+#{website.name}+'最新章节'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'最新章节列表,'+#{website.name}+'最新更新章节免费无广告无弹窗在线阅读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: #92B8B1;" class="layui-icon"></i></a>
|
||||
</div>
|
||||
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:text="${book.bookName}"></b></a>
|
||||
<div style="float: right;margin-right: 10px">
|
||||
<a href="/"><i style="font-size: 20px;color: #92B8B1;" 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 th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:text="${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>
|
@ -0,0 +1,311 @@
|
||||
<!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="#{website.name}+'列表'"></title>
|
||||
|
||||
<meta name="keywords"
|
||||
th:content="#{website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{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: #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 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{
|
||||
sortBy = "last_index_update_time";
|
||||
}
|
||||
|
||||
if(keyword){
|
||||
searchData.keyword = keyword;
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
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];
|
||||
|
||||
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 width='150' height='180' 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: #4c6978;font-weight: bold;font-size: 15px\">"+book.bookName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\">"+book.score+"分</i></div>\n" +
|
||||
" <a href=\"/book/book_ranking.html?keyword="+encodeURI(book.authorName)+"\">\n" +
|
||||
" <div style=\";color: #4c6978;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
|
||||
" </a>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #4c6978;\">类别:"+book.catName+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #4c6978;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #4c6978;\">更新:<i>"+book.lastIndexUpdateTime+"</i>\n" +
|
||||
" </div>\n" +
|
||||
" <div style=\"margin-top: 5px;color: #4c6978;\">简介:"+(book.bookDesc?(book.bookDesc.length>20?(book.bookDesc.substr(0,20)+"..."):bookDesc.length):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>
|
@ -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>
|
@ -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>
|
@ -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>
|
@ -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: 360px) {
|
||||
.app {
|
||||
display: block !important;
|
||||
}
|
||||
}
|
||||
|
||||
.pc {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@media (max-width: 360px) {
|
||||
.pc {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</div>
|
@ -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: #92B8B1;">轻小说</a>
|
||||
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #92B8B1;margin-left: 8px">漫画</a>-->
|
||||
<a href="/?to=pc" style="font-size: 14px;color: #92B8B1;margin-left: 8px">电脑站</a>
|
||||
<a href="/user/read_history.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">阅读记录</a>
|
||||
<a href="/user/favorites.html" 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>
|
||||
</div>
|
@ -0,0 +1,3 @@
|
||||
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
|
||||
<script th:fragment="js" src="/mobile/js/common.js"></script>
|
||||
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
|
@ -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>
|
382
novel-front/src/main/resources/templates/mobile/index.html
Normal file
382
novel-front/src/main/resources/templates/mobile/index.html
Normal file
@ -0,0 +1,382 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
|
||||
|
||||
<title th:text="#{website.name}"></title>
|
||||
|
||||
<meta name="keywords" th:content="#{website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
|
||||
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
|
||||
|
||||
<meta property="og:type" content="novel_index"/>
|
||||
<meta property="og:title" th:content="#{website.name}"/>
|
||||
<meta property="og:description"
|
||||
th:content="#{website.name}+'是国内优秀的小说弹幕网站,'+#{website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'"/>
|
||||
|
||||
|
||||
<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;
|
||||
}
|
||||
|
||||
</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">玄幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?catId=2">修真小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?catId=3">都市小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?catId=4">历史小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?catId=6">网游小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?catId=5">科幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?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?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=score">全部小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=1">玄幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=2">修真小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=3">都市小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=4">历史小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=6">网游小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=5">科幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=7">女频小说</a></dd>
|
||||
</dl>
|
||||
</li>
|
||||
<li class="layui-nav-item"><a href="javascript:toMyCollect()">书架</a></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">玄幻小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=2">修真小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=3">都市小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=4">历史小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=6">网游小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=5">科幻小说</a></li>
|
||||
<li class="layui-nav-item"><a href="/book/book_ranking.html?catId=7">女频小说</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=score">全部小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=1">玄幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=2">修真小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=3">都市小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=4">历史小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=6">网游小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=5">科幻小说</a></dd>
|
||||
<dd><a href="/book/book_ranking.html?sortBy=score&catId=7">女频小说</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">
|
||||
</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">
|
||||
<h2 class="layui-colla-title">本站推荐</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
|
||||
|
||||
<div class="layui-container" style="padding: 0px">
|
||||
|
||||
<div class="layui-row" style="text-align: center" id="currentWeek">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-colla-item">
|
||||
<h2 class="layui-colla-title">热门小说推荐</h2>
|
||||
<div class="layui-colla-content layui-show">
|
||||
|
||||
<div class="layui-container">
|
||||
<div class="layui-row" id="hotRecBooks">
|
||||
|
||||
|
||||
<!--<div th:each="hotBook : ${hotBooks}" style="margin-top: 1%"
|
||||
class="layui-col-xs12 layui-col-sm6 layui-col-md6 layui-col-lg6">
|
||||
<a th:href="'/book/'+${hotBook.id}+'.html'">
|
||||
<div class="layui-col-xs5 layui-col-sm3 layui-col-md3 layui-col-lg3">
|
||||
<img style=" width:100px; height:125px;"
|
||||
th:src="${hotBook.picUrl}"/>
|
||||
</div>
|
||||
|
||||
<div class="layui-col-xs7 layui-col-sm6 layui-col-md7 layui-col-lg7"
|
||||
style="float: left;padding-right: 10px">
|
||||
<div><b th:text="${hotBook.bookName}"></b></div>
|
||||
<div class="layui-col-xs8 layui-col-sm9 layui-col-md10 layui-col-lg10"
|
||||
th:text="'作者:'+ ${hotBook.author}"></div>
|
||||
<div class="layui-col-xs3 layui-col-sm2 layui-col-md1 layui-col-lg1" style="text-align: right;">
|
||||
<b><i style="color: red"
|
||||
th:text="${hotBook.score} + '分'"></i></b></div>
|
||||
</div>
|
||||
<div class="layui-elip layui-col-xs12 layui-col-sm9 layui-col-md10 layui-col-lg10 layui-col-sm9 layui-col-md10 layui-col-lg10"
|
||||
th:text="${hotBook.bookDesc}">
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</a>
|
||||
</div>-->
|
||||
</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()">
|
||||
<h2 class="layui-colla-title">最近更新小说
|
||||
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;"
|
||||
class="layui-icon">更多</i>
|
||||
</div>
|
||||
</h2>
|
||||
</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: "POST",
|
||||
url: "/book/listBookSetting",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
|
||||
//本周强推
|
||||
var rightListBooks = data.data[2];
|
||||
var rightListBooksHtml = "";
|
||||
for (var i = 0; i < 3; i++) {
|
||||
var rightListBook = rightListBooks[i];
|
||||
var classHtml = "";
|
||||
if (i == 0) {
|
||||
classHtml = "on";
|
||||
}
|
||||
if (i < 3) {
|
||||
classHtml += (" num" + (i + 1));
|
||||
}
|
||||
|
||||
rightListBooksHtml += (" <span>\n" +
|
||||
" <a href=\"/book/"+rightListBook.bookId+".html\">\n" +
|
||||
" <div style=\"padding: 1%\" class=\"layui-col-xs4 layui-col-sm4 layui-col-md4 layui-col-lg4\">\n" +
|
||||
" <img style=\" width:80%; height:auto; max-width:100%; max-height:100%;\"\n" +
|
||||
" src=\""+rightListBook.picUrl+"\"/>\n" +
|
||||
"\n" +
|
||||
" <br/>\n" +
|
||||
" <span>"+rightListBook.bookName+"</span>\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
" </a>\n" +
|
||||
" </span>");
|
||||
}
|
||||
$("#currentWeek").html(rightListBooksHtml);
|
||||
|
||||
//热门推荐
|
||||
var hotRecBooks = data.data[3];
|
||||
var hotRecBooksHtml = "";
|
||||
for (var i = 0; i < 6; i++) {
|
||||
var hotRecBook = hotRecBooks[i];
|
||||
|
||||
hotRecBooksHtml += ("<div style=\"margin-bottom: 5px\" class=\"layui-col-xs12 layui-col-sm6 layui-col-md4 layui-col-lg4\">\n" +
|
||||
" <a href=\"/book/"+hotRecBook.bookId+".html\">\n" +
|
||||
" <div class=\"layui-col-xs5 layui-col-sm4 layui-col-md4 layui-col-lg4\" >\n" +
|
||||
" <img style=\" width:100px; height:125px;\"\n" +
|
||||
" src=\""+hotRecBook.picUrl+"\"/>\n" +
|
||||
"\n" +
|
||||
" </div>\n" +
|
||||
" <div class=\"layui-col-xs5 layui-col-sm6 layui-col-md6 layui-col-lg6\">\n" +
|
||||
" <ul>\n" +
|
||||
" <li class=\"line-limit-length\" style=\"font-weight: bold\">"+hotRecBook.bookName+"</li>\n" +
|
||||
" <li>作者:"+hotRecBook.authorName+"</li>\n" +
|
||||
" <li style=\"width: 180px;height:40px;overflow: hidden\">简介: "+hotRecBook.bookDesc+"" +
|
||||
" </ul>\n" +
|
||||
" </div>\n" +
|
||||
" <div style=\"font-style: italic;color: red\"\n" +
|
||||
" class=\"layui-col-xs2 layui-col-sm2 layui-col-md2 layui-col-lg2\">"+hotRecBook.score+"分</div>\n" +
|
||||
" </a>\n" +
|
||||
" </div>");
|
||||
}
|
||||
$("#hotRecBooks").html(hotRecBooksHtml);
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
//更新榜单查询
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
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];
|
||||
|
||||
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\"><b>"+(i+1)+"."+updateRankBook.bookName+"</b> - <span class=\"layui-elip\">"+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=\"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>
|
113
novel-front/src/main/resources/templates/mobile/user/login.html
Normal file
113
novel-front/src/main/resources/templates/mobile/user/login.html
Normal file
@ -0,0 +1,113 @@
|
||||
<!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>
|
||||
|
||||
<form style="height: 500px;margin-top: 50px" 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-block">
|
||||
<input type="text" id="loginName" name="loginName" 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-input-inline">
|
||||
<input id="password" type="password" name="password" required lay-verify="required" placeholder="请输入密码" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">如果登录名不存在,则直接注册!</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 th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
<a name="buttom"></a>
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
|
||||
<script>
|
||||
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){});
|
||||
|
||||
</script>
|
||||
|
||||
<script>
|
||||
//Demo
|
||||
layui.use('form', function(){
|
||||
var form = layui.form;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formDemo)', function(){
|
||||
$.post("/user/loginOrRegist",{"bookId":$("#bookIdHidden").val(),"loginName":$("#loginName").val(),"password":$("#password").val()},function (data) {
|
||||
if(data.code == 1 || data.code == 2){
|
||||
localStorage.setItem("token",data.token);
|
||||
layer.alert(data.desc);
|
||||
setTimeout(function () {
|
||||
var bookId = $("#bookIdHidden").val();
|
||||
if(bookId){
|
||||
//加入书架
|
||||
window.location.href="/book/"+bookId+".html";
|
||||
}else{
|
||||
//我的书架
|
||||
window.location.href="/book/search?token="+data.token;
|
||||
}
|
||||
},3000)
|
||||
|
||||
}else{
|
||||
layer.alert(data.desc);
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</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>
|
127
novel-front/src/main/resources/templates/user/comment.html
Normal file
127
novel-front/src/main/resources/templates/user/comment.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'我的书评_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6 on" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 " href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl">我的书评</h2>
|
||||
<div class="fr"></div>
|
||||
</div>
|
||||
<div class="bookComment">
|
||||
<div class="no_contet no_comment" style="display:none">
|
||||
您还没有发表过评论!
|
||||
</div>
|
||||
<div class="commentBar" id="commentBar">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="pageBox cf" id="commentPage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 5);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/listCommentByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var commentList = data.data.list;
|
||||
if (commentList.length > 0) {
|
||||
$("#bookCommentTotal").html("("+data.data.total+"条)");
|
||||
var commentListHtml = "";
|
||||
for (var i = 0; i < commentList.length; i++) {
|
||||
var comment = commentList[i];
|
||||
commentListHtml += ("<div class=\"comment_list cf\">" +
|
||||
"<div class=\"user_heads fl\" vals=\"389\">" +
|
||||
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
|
||||
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
|
||||
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" +
|
||||
comment.commentContent+
|
||||
"</li><li class=\"other cf\">" +
|
||||
"<span class=\"time fl\">"+comment.createTime+"</span>" +
|
||||
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
|
||||
"</span></li>\t\t</ul>\t</div>");
|
||||
}
|
||||
$("#commentBar").html(commentListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'commentPage' //注意,这里的 test1 是 ID,不用加 # 号
|
||||
, count: data.data.total //数据总数,从服务端得到,
|
||||
, curr: data.data.pageNum
|
||||
, limit: data.data.pageSize
|
||||
, jump: function (obj, first) {
|
||||
|
||||
|
||||
//obj包含了当前分页的所有参数,比如:
|
||||
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
|
||||
console.log(obj.limit); //得到每页显示的条数
|
||||
|
||||
|
||||
//首次不执行
|
||||
if (!first) {
|
||||
search(obj.curr, obj.limit);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
161
novel-front/src/main/resources/templates/user/favorites.html
Normal file
161
novel-front/src/main/resources/templates/user/favorites.html
Normal file
@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'我的书架_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="'我的书架,个人中心,'+#{website.name}+'小说,'+#{website.name}" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
</head>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4 on" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6 " href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 " href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl"><a href="javascript:void(0);" class="red">我的书架</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/read_history.html" >最近阅读</a></h2>
|
||||
</div>
|
||||
|
||||
<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="style">
|
||||
类别
|
||||
</th>
|
||||
<th class="name">
|
||||
书名
|
||||
</th>
|
||||
<th class="chapter">
|
||||
最新章节
|
||||
</th>
|
||||
<th class="time">
|
||||
更新时间
|
||||
</th>
|
||||
<th class="goread">
|
||||
书签
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="shellPage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 10);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/listBookShelfByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookShelfList = data.data.list;
|
||||
if (bookShelfList.length > 0) {
|
||||
var bookShelfListHtml = "";
|
||||
for(var i=0;i<bookShelfList.length;i++){
|
||||
var book = bookShelfList[i];
|
||||
bookShelfListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" +
|
||||
" <td class=\"style bookclass\">\n" +
|
||||
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"name\">\n" +
|
||||
" <a href=\"/book/"+book.bookId+".html\">\n" +
|
||||
" "+book.bookName+"</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
|
||||
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+
|
||||
" </td>\n" +
|
||||
" <td class=\"time\">\n" +
|
||||
" "+book.lastIndexUpdateTime+"\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+
|
||||
" </td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookShelfList").html(bookShelfListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'shellPage' //注意,这里的 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 if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</html>
|
104
novel-front/src/main/resources/templates/user/feedback.html
Normal file
104
novel-front/src/main/resources/templates/user/feedback.html
Normal file
@ -0,0 +1,104 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'反馈留言_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="channelWrap channelFeedback cf">
|
||||
|
||||
<div class="userBox cf">
|
||||
<div class="viewhistoryBox">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl ml10">
|
||||
<a href="javascript:void(0);">反馈留言</a></h2>
|
||||
</div>
|
||||
<div class="feedbackBox">
|
||||
|
||||
<form method="post" action="/" id="Form1"
|
||||
onsubmit="javascript:return checkForm();">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||
value="/wEPDwUKLTI0NTcxNzYzNQ9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZOKmHcn3Hx3hiIXMcMpQUjAD9MIGLnq1zjEfYvQaVwy3"/>
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR"
|
||||
value="EC00F135"/>
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
|
||||
value="/wEdAAOgvD0TAZWHlMabubpkV5BnBh62Mb2K7OVw5a48s/sFVJZYgDymPir0Zp4mFYzbkIhNun0nyr9cDo847Ee31BA4NS8zv4PJDmcEpjfg+YdsoQ=="/>
|
||||
</div>
|
||||
<ul class="reg_list">
|
||||
<li>
|
||||
<textarea name="txtDescription" rows="2" cols="20" id="txtDescription"
|
||||
class="textarea" placeholder="请说明情况,并留下联系方式,你可以在个人中心【我的反馈】里查看回复~">
|
||||
</textarea></li>
|
||||
<li class="mb20">
|
||||
<input type="submit" name="btnSave" value="提交" id="btnSave"
|
||||
class="btn_red btn_big"/></li>
|
||||
<li>
|
||||
<span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
function checkForm() {
|
||||
var des = $("#txtDescription").val();
|
||||
des = $.trim(des);
|
||||
var errStr = '';
|
||||
if (des == "") {
|
||||
errStr = '反馈内容必须填写';
|
||||
} else if (des.length < 5) {
|
||||
errStr = '反馈内容不能少于5个字';
|
||||
}
|
||||
if (errStr != '') {
|
||||
layer.alert(errStr);
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/addFeedBack",
|
||||
data: {'content': $("#txtDescription").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
location.href = '/user/feedback_list.html'
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
127
novel-front/src/main/resources/templates/user/feedback_list.html
Normal file
127
novel-front/src/main/resources/templates/user/feedback_list.html
Normal file
@ -0,0 +1,127 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'我的反馈_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 on" href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 " href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl">我的反馈</h2>
|
||||
<div class="fr"><a href="/user/feedback.html" class="btn_red">写反馈</a></div>
|
||||
</div>
|
||||
|
||||
<dl class="feedback_list cf">
|
||||
<dd id="feedbackList">
|
||||
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
</dl>
|
||||
<div class="cf">
|
||||
<div class="help_bar fl hidden">
|
||||
<a href=""><span class="txt">读者常见问题(18)</span></a>
|
||||
</div>
|
||||
<div class="pageBox cf" id="feedbackPage">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
search(1, 5);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/listUserFeedBackByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var feedbackList = data.data.list;
|
||||
if (feedbackList.length > 0) {
|
||||
var feedbackListHtml = "";
|
||||
for (var i = 0; i < feedbackList.length; i++) {
|
||||
var feedback = feedbackList[i];
|
||||
feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" +
|
||||
" <li class=\"li_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">"+feedback.createTime+"</span></li>\n" +
|
||||
" <li class=\"li_2\">"+feedback.content+"</li>\n" +
|
||||
" </ul></div>");
|
||||
}
|
||||
$("#feedbackList").html(feedbackListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'feedbackPage' //注意,这里的 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 if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
112
novel-front/src/main/resources/templates/user/login.html
Normal file
112
novel-front/src/main/resources/templates/user/login.html
Normal file
@ -0,0 +1,112 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'会员登录_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="'会员登录,个人中心,'+#{website.name}+'小说,'+#{website.name}" />
|
||||
<meta name="description" th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'" />
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="user_l">
|
||||
<form method="post" action="./login.html" id="form1">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJLTU4MDE1Nzc3D2QWAmYPZBYCZg8WAh4EVGV4dAWoATxhIGhyZWY9Ii9zZWFyY2guYXNweD9zZWFyY2hLZXk95Za75a6J6Zuv77yM54uE5rO977yM54G15byC77yM5YmN5LiW5LuK55Sf77yM5Yal546L6ay85aSrIiB0YXJnZXQ9Il9ibGFuayI+5Za75a6J6Zuv77yM54uE5rO977yM54G15byC77yM5YmN5LiW5LuK55Sf77yM5Yal546L6ay85aSrPC9hPmRke+U5PV/m7ho155TiR+flEgGjh+T6z8Hjoa5q62rCUFg=" />
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="C93BE1AE" />
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAXkRxK+hbBn9D6bVAXo8t/4qKSXUE1UN51mNFrIuw38c3Y2+Mc6SrnAqio3oCKbxYainihG6d/Xh3PZm3b5AoMQ2xnvcKe7Apj/DdmzfeCXoTjAjITeRewsBR3AmjdQ75+yP5bUUcdUUiZlMKONJDef" />
|
||||
</div>
|
||||
<h3 th:text="'登陆'+#{website.name}"></h3>
|
||||
<ul class="log_list">
|
||||
<li><span id="LabErr"></span></li>
|
||||
<li><input name="txtUName" type="text" id="txtUName" placeholder="手机号码" class="s_input icon_name" /></li>
|
||||
<li><input name="txtPassword" type="password" id="txtPassword" placeholder="密码" class="s_input icon_key" /></li>
|
||||
<li class="autologin cf"><label class="fl"><input id="autoLogin" type="checkbox" /><em>下次自动登录</em></label></li>
|
||||
<li><input type="button" name="btnLogin" value="登录" id="btnLogin" class="btn_red" /></li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
<div class="user_r">
|
||||
<p class="tit">还没有注册账号?</p>
|
||||
<a href="/user/register.html" class="btn_ora_white">立即注册</a>
|
||||
<div class="fast_login" style="display:none;">
|
||||
<div class="fast_tit">
|
||||
<p class="lines"></p>
|
||||
<span class="title">其他登录方式</span>
|
||||
</div>
|
||||
<ul class="fast_list">
|
||||
<li class="login_wb"><a href="/"><img src="/images/login_weibo.png" alt="微博登录" class="img" /><span>微博登录</span></a></li>
|
||||
<li class="login_qq"><a href="/"><img src="/images/login_qq.png" alt="QQ登录" class="img" /><span>QQ登录</span></a></li>
|
||||
<li class="login_wx"><a href="/"><img src="/images/login_weixin.png" alt="微信登录" class="img" /><span>微信登录</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
|
||||
|
||||
</body>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
if(localStorage.getItem("autoLogin")==1){
|
||||
$("#autoLogin").attr("checked",'true');
|
||||
}else{
|
||||
$("#autoLogin").removeAttr("checked");
|
||||
}
|
||||
$("#btnLogin").click(function () {
|
||||
var username = $("#txtUName").val();
|
||||
if(username.isBlank()){
|
||||
$("#LabErr").html("手机号不能为空!");
|
||||
return;
|
||||
}
|
||||
if(!username.isPhone()){
|
||||
$("#LabErr").html("手机号格式不正确!");
|
||||
return;
|
||||
}
|
||||
var password = $("#txtPassword").val();
|
||||
if(password.isBlank()){
|
||||
$("#LabErr").html("密码不能为空!");
|
||||
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 {
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</html>
|
149
novel-front/src/main/resources/templates/user/read_history.html
Normal file
149
novel-front/src/main/resources/templates/user/read_history.html
Normal file
@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'最近阅读_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="viewhistoryBox">
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h2 class="fl ml10"><a href="javascript:void(0);" class="red">最近阅读</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/user/favorites.html">我的书架</a></h2>
|
||||
</div>
|
||||
<div id="divData" class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="style">
|
||||
类别
|
||||
</th>
|
||||
<th class="name">
|
||||
书名
|
||||
</th>
|
||||
<th class="chapter">
|
||||
最新章节
|
||||
</th>
|
||||
<th class="time">
|
||||
更新时间
|
||||
</th>
|
||||
<th class="goread">
|
||||
书签
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookHistoryList">
|
||||
|
||||
<!--<tr class="book_list" vals="234">
|
||||
<td class="style bookclass"></td>
|
||||
<td class="name">
|
||||
<a href="/book/234.html"></td>
|
||||
<td class="chapter" valsc="234|2005456|1"></td>
|
||||
<td class="time"></td>
|
||||
<td class="goread"></td>
|
||||
</tr>-->
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="pageBox cf" id="historyPage">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
search(1, 10);
|
||||
|
||||
function search(curr, limit) {
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/listReadHistoryByPage",
|
||||
data: {'curr':curr,'limit':limit},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookHistoryList = data.data.list;
|
||||
if (bookHistoryList.length > 0) {
|
||||
var bookHistoryListHtml = "";
|
||||
for(var i=0;i<bookHistoryList.length;i++){
|
||||
var book = bookHistoryList[i];
|
||||
bookHistoryListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" +
|
||||
" <td class=\"style bookclass\">\n" +
|
||||
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"name\">\n" +
|
||||
" <a href=\"/book/"+book.bookId+".html\">\n" +
|
||||
" "+book.bookName+"</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
|
||||
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+
|
||||
" </td>\n" +
|
||||
" <td class=\"time\">\n" +
|
||||
" "+book.lastIndexUpdateTime+"\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+
|
||||
" </td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookHistoryList").html(bookHistoryListHtml);
|
||||
|
||||
layui.use('laypage', function () {
|
||||
var laypage = layui.laypage;
|
||||
|
||||
//执行一个laypage实例
|
||||
laypage.render({
|
||||
elem: 'historyPage' //注意,这里的 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 if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
}else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
133
novel-front/src/main/resources/templates/user/register.html
Normal file
133
novel-front/src/main/resources/templates/user/register.html
Normal file
@ -0,0 +1,133 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link})">
|
||||
<title th:text="'会员注册_'+#{website.name}"></title>
|
||||
<meta name="keywords" th:content="'会员注册,个人中心,'+#{website.name}+'小说,'+#{website.name}"/>
|
||||
<meta name="description"
|
||||
th:content="#{website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+#{website.name}+'小说!'"/>
|
||||
<link rel="stylesheet" href="/css/user.css" />
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<form method="post" action="./register.html" id="form2">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE"
|
||||
value="/wEPDwUKLTIzNjMxNDQxNw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZOquoASBvnvPbc/TYIQiLhSPJ8GKnYQrmk7jGhb5AC5Q"/>
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="23AA6834"/>
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION"
|
||||
value="/wEdAAVece19BIZ9HiByRfHz3pfnqKSXUE1UN51mNFrIuw38c3Y2+Mc6SrnAqio3oCKbxYZZ1lS+gZUZKpbsAea8j7ASAv40DHFcQ/NE7tJUnABeyQ3d9sFDIcFCYNqlVtprfLoh4JFy0U+R/CcMuyAiWTz7"/>
|
||||
</div>
|
||||
<div class="user_l">
|
||||
<h3 th:text="'注册'+#{website.name}+'小说账号'"></h3>
|
||||
<ul class="log_list">
|
||||
<li><span id="LabErr"></span></li>
|
||||
<li><input name="txtUName" type="text" id="txtUName" class="s_input icon_name"
|
||||
placeholder="请输入您的手机号码"/></li>
|
||||
<li><input name="txtPassword" type="password" id="txtPassword" class="s_input icon_key"
|
||||
placeholder="请输入密码:6-20位字母/数字"/></li>
|
||||
<li class="log_code cf"><input name="TxtChkCode" type="text" maxlength="4" id="TxtChkCode"
|
||||
class="s_input icon_code" placeholder="请输入验证码"/><img
|
||||
style="border: 1px solid #eee" class="code_pic" src="" id="chkd"
|
||||
onclick="getVerify(this);"/></li>
|
||||
<li><input type="button" name="btnRegister" value="注册" id="btnRegister" class="btn_red"/></li>
|
||||
</ul>
|
||||
</div>
|
||||
</form>
|
||||
<div class="user_r">
|
||||
<p class="tit">已有账号?</p>
|
||||
<a href="/user/login.html" class="btn_ora_white">立即登录</a>
|
||||
<div class="fast_login" style="display:none;">
|
||||
<div class="fast_tit">
|
||||
<p class="lines"></p>
|
||||
<span class="title">其他登录方式</span>
|
||||
</div>
|
||||
<ul class="fast_list">
|
||||
<li class="login_wb"><a href="/"><img src="/images/login_weibo.png" alt="微博登录"
|
||||
class="img"><span>微博登录</span></a></li>
|
||||
<li class="login_qq"><a href="/"><img src="/images/login_qq.png" alt="QQ登录"
|
||||
class="img"><span>QQ登录</span></a></li>
|
||||
<li class="login_wx"><a href="/"><img src="/images/login_weixin.png" alt="微信登录"
|
||||
class="img"><span>微信登录</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script language="javascript" type="text/javascript">
|
||||
$("#chkd").click();
|
||||
$(function () {
|
||||
$("#form2").submit(function () {
|
||||
if ($("#txtUName").val() != "" && $("#txtPassword").val() != "" && $("#TxtSmsCode").val() != "") {
|
||||
} else {
|
||||
layer.open({
|
||||
content: '请填写全部资料',
|
||||
style: UserUtil.msgStyle,
|
||||
time: 2
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//获取验证码
|
||||
function getVerify(obj) {
|
||||
obj.src = "/file/getVerify?" + Math.random();
|
||||
}
|
||||
|
||||
$("#btnRegister").click(function () {
|
||||
var username = $("#txtUName").val();
|
||||
if (username.isBlank()) {
|
||||
$("#LabErr").html("手机号不能为空!");
|
||||
return;
|
||||
}
|
||||
if (!username.isPhone()) {
|
||||
$("#LabErr").html("手机号格式不正确!");
|
||||
return;
|
||||
}
|
||||
var password = $("#txtPassword").val();
|
||||
if (password.isBlank()) {
|
||||
$("#LabErr").html("密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var velCode = $("#TxtChkCode").val();
|
||||
if (velCode.isBlank()) {
|
||||
$("#LabErr").html("验证码不能为空!");
|
||||
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 {
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
117
novel-front/src/main/resources/templates/user/set_name.html
Normal file
117
novel-front/src/main/resources/templates/user/set_name.html
Normal file
@ -0,0 +1,117 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改昵称_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 on" href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<div class="my_info_txt">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKMTI5MzkzMzQyMw9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZLj1Uo6akAHRsP9HH/tJWCPmjwlzm9tv02sZRfbbCnBA" />
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="6C876674" />
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAO8SPdUDpH0Q7nHjeqbvI7ld2C+OxfjpZOniBJbql7XdnRgTJ25FWigbeFr84Vgoxdi/cg2vS37N0KER6F1nyr1wKHztnXmDR5zls+9dCeAZg==" />
|
||||
</div>
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的昵称</i><input name="txtNiceName" type="text" value="15171695474" maxlength="20" id="txtNiceName" class="s_input" placeholder="" /></li>
|
||||
<li><i class="tit"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
||||
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/userInfo",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if(data.data.nickName){
|
||||
$("#txtNiceName").val(data.data.nickName);
|
||||
}else{
|
||||
$("#txtNiceName").val(data.data.username);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
function updateName() {
|
||||
var nickname = $("#txtNiceName").val();
|
||||
if(nickname.isBlank()){
|
||||
$("#LabErr").html("昵称不能为空!");
|
||||
return;
|
||||
}
|
||||
if(!nickname.isNickName()){
|
||||
$("#LabErr").html("昵称格式不正确!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/updateUserInfo",
|
||||
data: {'nickName':nickname},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
window.location.href = '/user/setup.html';
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,99 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改密码_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 on" href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<div class="my_info_txt">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE5NTM3Mjc0MTkPZBYEZg9kFgJmDxYCHgRUZXh0BagBPGEgaHJlZj0iL3NlYXJjaC5hc3B4P3NlYXJjaEtleT3llrvlronpm6/vvIzni4Tms73vvIzngbXlvILvvIzliY3kuJbku4rnlJ/vvIzlhqXnjovprLzlpKsiIHRhcmdldD0iX2JsYW5rIj7llrvlronpm6/vvIzni4Tms73vvIzngbXlvILvvIzliY3kuJbku4rnlJ/vvIzlhqXnjovprLzlpKs8L2E+ZAICD2QWAgIJDw8WAh8ABSHkuKTmrKHovpPlhaXnmoTmlrDlr4bnoIHkuI3ljLnphY1kZGRhp36YOW0VXvnzag3X7ggb4GZjGR2iOhc3esYV+gLQoA==" />
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="65B8FACB" />
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAX/+YBS+s4SAkXd5M3/Ah/txr1QWsMVpxihbk+u9oMvC/bi8V6FV2PI0iftNhvgoqk7nMhcHLH9bj8jEonVtSua9n7/EOPGKgFySK9U6TwmXfgmt+UwsLWDkQL9tHgrPR3yuBzIgg7/7BXfGNHKEmhv" />
|
||||
</div>
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的密码</i><input name="oldPass" type="password" id="txtOldPass" class="s_input" placeholder="请输入原密码" /></li>
|
||||
<li><i class="tit"> </i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li>
|
||||
<li><i class="tit"> </i><input name="txtNewPass2" type="password" id="txtNewPass2" class="s_input" placeholder="请确认新密码" /></li>
|
||||
<li><i class="tit"> </i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
function updatePassword() {
|
||||
var oldPassword = $("#txtOldPass").val();
|
||||
if (oldPassword.isBlank()) {
|
||||
$("#LabErr").html("旧密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var newPassword1 = $("#txtNewPass1").val();
|
||||
if (newPassword1.isBlank()) {
|
||||
$("#LabErr").html("新密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var newPassword2 = $("#txtNewPass2").val();
|
||||
if (newPassword2.isBlank()) {
|
||||
$("#LabErr").html("确认密码不能为空!");
|
||||
return;
|
||||
}
|
||||
if(newPassword1 !== newPassword2){
|
||||
$("#LabErr").html("两次输入的新密码不匹配!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/updatePassword",
|
||||
data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
window.location.href = '/user/setup.html';
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
108
novel-front/src/main/resources/templates/user/set_sex.html
Normal file
108
novel-front/src/main/resources/templates/user/set_sex.html
Normal file
@ -0,0 +1,108 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'修改性别_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 on" href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<div class="my_info_txt">
|
||||
<div class="aspNetHidden">
|
||||
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTkyODgwMDQwMA9kFgJmD2QWAmYPFgIeBFRleHQFqAE8YSBocmVmPSIvc2VhcmNoLmFzcHg/c2VhcmNoS2V5PeWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqyIgdGFyZ2V0PSJfYmxhbmsiPuWWu+Wuiembr++8jOeLhOazve+8jOeBteW8gu+8jOWJjeS4luS7iueUn++8jOWGpeeOi+msvOWkqzwvYT5kZMZ5uDacrADq981tXsiwhce7e3YhhhJ5JQQTUHxIrSut" />
|
||||
</div>
|
||||
|
||||
<div class="aspNetHidden">
|
||||
|
||||
<input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="5DBBC1A2" />
|
||||
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAIB0+ZH6KYdr1mTvok41QcAdGBMnbkVaKBt4WvzhWCjFyKLzSsxk3yjFX2xXrDnmlabnJvU11tPMoHIge4rg3hW" />
|
||||
</div>
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的性别</i>
|
||||
<label><input type="radio" name="sex" value="0" /> 男生</label>
|
||||
<label><input class="ml20" type="radio" name="sex" value="1" checked /> 女生</label>
|
||||
</li>
|
||||
<li class="mt20"><i class="tit"> </i><input type="button" onclick="updateSex()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/userInfo",
|
||||
data: {},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
if(data.data.userSex === 0){
|
||||
$("input[name=sex]").eq(0).attr("checked",true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
function updateSex() {
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/updateUserInfo",
|
||||
data: {'userSex':$("input[name=sex]:checked").val()},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
window.location.href = '/user/setup.html';
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
87
novel-front/src/main/resources/templates/user/setup.html
Normal file
87
novel-front/src/main/resources/templates/user/setup.html
Normal file
@ -0,0 +1,87 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'账号设置_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 " href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 on" href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<div class="my_info_txt">
|
||||
<ul class="mytab_list">
|
||||
<li><i class="tit">我的头像</i><a href="javascript:void(0);"><img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" /></a></li>
|
||||
<li><i class="tit">我的昵称</i><a href="/user/set_name.html" id="my_name"></a></li>
|
||||
<li style="display:none"><i class="tit">电子邮箱</i><a href="javascript:void(0);"></a></li>
|
||||
<li><i class="tit">我的性别</i><a href="/user/set_sex.html" id="my_sex"></a></li>
|
||||
<li><i class="tit">我的密码</i><a href="/user/set_password.html">修改密码</a></li>
|
||||
<li><i class="tit">当前状态</i><a href="javascript:logout()">退出登录</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script src="/javascript/user.js" type="text/javascript"></script>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
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+"<em class=\"ml10\">[修改]</em>");
|
||||
}else{
|
||||
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>");
|
||||
}
|
||||
if(data.data.userSex === 0){
|
||||
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
|
||||
}else if(data.data.userSex === 1){
|
||||
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
|
||||
}else{
|
||||
$("#my_sex").html("请选择");
|
||||
}
|
||||
|
||||
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
159
novel-front/src/main/resources/templates/user/userinfo.html
Normal file
159
novel-front/src/main/resources/templates/user/userinfo.html
Normal file
@ -0,0 +1,159 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link})">
|
||||
<title th:text="'个人中心_'+#{website.name}"></title>
|
||||
<link rel="stylesheet" href="/css/user.css"/>
|
||||
</head>
|
||||
<body class="">
|
||||
|
||||
<div th:replace="common/top :: top('')">
|
||||
</div>
|
||||
<div class="main box_center cf">
|
||||
<div class="userBox cf">
|
||||
<div class="my_l">
|
||||
|
||||
<ul class="log_list">
|
||||
<li><a class="link_1 on" href="/user/userinfo.html">个人中心</a></li>
|
||||
<li><a class="link_4" href="/user/favorites.html">我的书架</a></li>
|
||||
<li><a class="link_6" href="/user/comment.html">我的书评</a></li>
|
||||
<li><a class="link_7 " href="/user/feedback_list.html">我的反馈</a></li>
|
||||
<li><a class="link_8 " href="/user/setup.html">账号设置</a></li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
<div class="my_r">
|
||||
<div class="my_info cf">
|
||||
<img id="imgLogo" class="user_big_head" src="/images/man.png" />
|
||||
<div class="my_info_txt">
|
||||
<p class="my_name" id="my_name">
|
||||
</p>
|
||||
<ul class="my_list">
|
||||
<li class="my_gold"><i>账户余额:</i><em class="red">0</em>屋币<em class="red">+</em><em class="red">0</em>代金券<a href="javascript:layer.alert('充值通道待开通,敬请期待!');" class="btn_link">立即充值</a></li>
|
||||
<li class="my_baonian"></li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="my_bookshelf">
|
||||
<div class="title cf">
|
||||
<h4 class="fl">
|
||||
我的书架</h4>
|
||||
<a href="/user/favorites.html" class="fr">全部收藏 ></a>
|
||||
</div>
|
||||
<div class="updateTable">
|
||||
<table cellpadding="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="style">
|
||||
类别
|
||||
</th>
|
||||
<th class="name">
|
||||
书名
|
||||
</th>
|
||||
<th class="chapter">
|
||||
最新章节
|
||||
</th>
|
||||
<th class="time">
|
||||
更新时间
|
||||
</th>
|
||||
<th class="goread">
|
||||
书签
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="bookShelfList">
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript" src="/javascript/user.js"></script>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
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);
|
||||
}
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
//查询书架列表
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/listBookShelfByPage",
|
||||
data: {'limit':2},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
var bookShelfList = data.data.list;
|
||||
if (bookShelfList.length > 0) {
|
||||
var bookShelfListHtml = "";
|
||||
for (var i = 0; i < bookShelfList.length; i++) {
|
||||
var book = bookShelfList[i];
|
||||
bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
|
||||
" <td class=\"style bookclass\">\n" +
|
||||
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >[" + book.catName + "]</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"name\">\n" +
|
||||
" <a href=\"/book/" + book.bookId + ".html\">\n" +
|
||||
" " + book.bookName + "</a>\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
|
||||
"<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
|
||||
" </td>\n" +
|
||||
" <td class=\"time\">\n" +
|
||||
" " + book.lastIndexUpdateTime + "\n" +
|
||||
" </td>\n" +
|
||||
" <td class=\"goread\">\n" +
|
||||
"<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
|
||||
" </td>\n" +
|
||||
" </tr>");
|
||||
}
|
||||
$("#bookShelfList").html(bookShelfListHtml);
|
||||
}
|
||||
|
||||
} else {
|
||||
layer.alert(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user