feat(templates): 新增绿色主题模版,并设置为默认模版

和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
xiongxiaoyang
2023-10-13 21:21:21 +08:00
parent 00179359bd
commit 255b3f8c4b
575 changed files with 72292 additions and 955 deletions

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Page Not Found</title>
<script>
setTimeout(function () {
location.href = '/';
},1000)
</script>
</head>
<body style="background: url(/images/404.jpeg) no-repeat;" >
</body>
</html>

View 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="'新闻公共_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description"
th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.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="my_r" style="width: 960px">
<div class="newsBox">
<ul class="news_list" id="newsList">
</ul>
</div>
<div class="pageBox cf" id="newsPage">
</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: "get",
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>

View File

@ -0,0 +1,41 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'新闻公告_'+${application.website.name}"></title>
<meta name="keywords" content="新闻公告,小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学"/>
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" />
<link rel="stylesheet" href="/css/about.css" />
</head>
<body class="body">
<div th:replace="common/top :: top('')">
</div>
<input type="hidden" id="newsId" th:value="${news.id}"/>
<div class="main box_center cf">
<div class="newsMain cf">
<div class="nav_sub">
当前位置:<a href="/" > 首页 </a> &gt; <a href="/about/news.html" > 新闻公告 </a> &gt; <span th:utext="${news.title}"> </span>
</div>
<div class="channelWrap channelNews cf">
<div class="news_title">
<h2 th:utext="${news.title}"></h2>
<!--while [[...]] corresponds to th:text (i.e. result will be HTML-escaped), [(...)] corresponds to th:utext-->
<p class="from">来源:[[${news.sourceName}]] <span class="time" th:text="'时间'+${#dates.format(news.createTime, 'yy-MM-dd')}"></span> <span class="time" th:text="'阅读量'+${news.readCount}"></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>
<script type="text/javascript">
$.post("/news/addReadCount", {"newsId": $("#newsId").val()}, function () {
});
</script>
</html>

View File

@ -0,0 +1,227 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" />
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4" href="/author/index.html">小说管理</a></li>
<li><a class="link_2 on" href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="goread">
月份
</th>
<th class="goread">
税前收入
</th>
<th class="goread">
税后收入
</th>
<th class="goread">
支付状态
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 10);
function search(curr, limit) {
$.ajax({
type: "get",
url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
var bookListHtml = "";
for(var i=0;i<bookList.length;i++){
var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" +
" "+book.incomeMonth+"</td>\n" +
" <td class=\"goread\" >"
+book.preTaxIncome/100+"</td>\n" +
" <td class=\"goread\">\n" +
" "+book.afterTaxIncome/100+"\n" +
" </td>\n" +
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+
" </td>\n" +
" </tr>");
}
$("#bookList").html(bookListHtml);
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('网络异常');
}
})
}
function updateBookStatus(bookId,status) {
$.ajax({
type: "POST",
url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,233 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" />
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4" href="/author/index.html">小说管理</a></li>
<li><a class="link_2 on" href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="goread">
日期
</th>
<th class="goread">
订阅总额
</th>
<th class="goread">
订阅次数
</th>
<th class="goread">
订阅人数
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var bookId = getSearchString("bookId");
search(1, 10);
function search(curr, limit) {
var data = {'curr':curr,'limit':limit};
if(bookId){
data.bookId = bookId;
}
$.ajax({
type: "get",
url: "/author/listIncomeDailyByPage",
data: data,
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
var bookListHtml = "";
for(var i=0;i<bookList.length;i++){
var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" +
" "+book.incomeDate+"</td>\n" +
" <td class=\"goread\" >"
+book.incomeAccount+"</td>\n" +
" <td class=\"goread\">\n" +
" "+book.incomeCount+"\n" +
" </td>\n" +
" <td class=\"goread\">"+book.incomeNumber+
" </td>\n" +
" </tr>");
}
$("#bookList").html(bookListHtml);
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('网络异常');
}
})
}
function updateBookStatus(bookId,status) {
$.ajax({
type: "POST",
url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,232 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css"/>
<style type="text/css">
.opacity{-khtml-opacity:0.0;-moz-opacity:0.0;filter:alpha(opacity=0);filter:"alpha(opacity=0)";opacity:0.0; filter: progid:DXImageTransform.Microsoft.Alpha(opacity=0);/*兼容ie8及以下*/}
</style>
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="userBox cf">
<form method="post" action="./register.html" id="form2">
<div class="user_l">
<div></div>
<h3>小说基本信息填写</h3>
<ul class="log_list">
<li><span id="LabErr"></span></li>
<b>作品方向:</b>
<li><select class="s_input" id="workDirection" name="workDirection">
<option value="0">男频</option>
<option value="1">女频</option>
</select>
</li>
<b>分类:</b>
<li><select class="s_input" id="catId" name="catId">
<option value="1">玄幻奇幻</option>
<option value="2">武侠仙侠</option>
<option value="3">都市言情</option>
<option value="4">历史军事</option>
<option value="5">科幻灵异</option>
<option value="6">网游竞技</option>
<option value="7">女生频道</option>
</select></li>
<input type="hidden" id="catName" name="catName" value="玄幻奇幻"/>
<b>小说名:</b>
<li><input type="text" id="bookName" name="bookName" class="s_input" ></li>
<b>小说封面:</b>
<li style="position: relative">
<input class="opacity" onchange="picChange()"
type="file" id="file0" name="file"
title="点击更换图片"
style="z-index: 100;cursor: pointer;left: 0px; top: 0px; width: 100px; height: 130px; opacity: 0; position: absolute; "
/>
<img style="width:100px;height: 130px" id="picImage" src="/images/pic_upload.png" alt="">
<input type="hidden" id="picUrl" name="picUrl" class="s_input" value="/images/default.gif"></li>
<b>小说介绍:</b>
<li><textarea name="bookDesc" rows="5" cols="53" id="bookDesc"
class="textarea"></textarea></li>
<li><input type="button" onclick="addBook()" name="btnRegister" value="提交"
id="btnRegister" class="btn_red"></li>
</ul>
</div>
</form>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/javascript/ajaxfileupload.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
function picChange() {
var file = $("#file0").val(); //文件名称
if (file != "") {
if(checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议一般设置为false
fileElementId: "file0", //文件上传域的ID
dataType: "json", //返回值类型 一般设置为json
type: "post",
success: function (data) { //服务器成功响应处理函数
if (data.code == 200) {
$("#picImage").attr("src", data.data);
$("#picUrl").val(data.data);
} else {
layer.alert(data.msg);
}
}
});
}
} else {
alert("请选择上传文件");
}
}
var lock = false;
function addBook() {
if(lock){
return;
}
lock = true;
var bookName = $("#bookName").val();
if(!bookName){
$("#LabErr").html("小说名不能为空");
lock = false;
return;
}
if(bookName.length > 20){
$("#LabErr").html("小说名太长");
lock = false;
return;
}
var picUrl = $("#picUrl").val();
if(!picUrl){
$("#LabErr").html("封面图片不能为空");
lock = false;
return;
}
var bookDesc = $("#bookDesc").val();
if(!bookDesc){
$("#LabErr").html("简介不能为空");
lock = false;
return;
}
$.ajax({
type: "POST",
url: "/author/addBook",
data: {'workDirection': $("#workDirection").val(),
'catId':$("#catId").val(),'catName':$("#catId").find("option[value="+$("#catId").val()+"]").html(),
'bookName':bookName,'picUrl':picUrl,'bookDesc':bookDesc},
dataType: "json",
success: function (data) {
if (data.code == 200) {
window.location.href = '/author/index.html';
} else {
lock = false;
$("#LabErr").html(data.msg);
}
},
error: function () {
lock = false;
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,173 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css"/>
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="userBox cf">
<form method="post" action="./register.html" id="form2">
<div class="user_l">
<div></div>
<h3>小说章节内容填写</h3>
<ul class="log_list">
<li><span id="LabErr"></span></li>
<b>章节名:</b>
<li><input type="text" id="bookIndex" name="bookIndex" class="s_input" ></li>
<b>章节内容:</b><li id="contentLi">
<textarea name="bookContent" rows="30" cols="80" id="bookContent"
class="textarea"></textarea></li><br/>
<b>是否收费:</b>
<li><input type="radio" name="isVip" value="0" checked >免费
<input type="radio" name="isVip" value="1" >收费</li>
<li style="margin-top: 10px"><input type="button" onclick="addBookContent()" name="btnRegister" value="提交"
id="btnRegister" class="btn_red">
</li>
</ul>
</div>
</form>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var lock = false;
function addBookContent() {
if(lock){
return;
}
lock = true;
var bookId = getSearchString("bookId");
var indexName = $("#bookIndex").val();
if(!indexName){
$("#LabErr").html("章节名不能为空");
lock = false;
return;
}
var content = $("#bookContent").val();
if(!content){
$("#LabErr").html("章节内容不能为空");
lock = false;
return;
}
var isVip = $("input:checked[name=isVip]").val();
$.ajax({
type: "POST",
url: "/author/addBookContent",
data: {'bookId':bookId,'indexName':indexName,'content':content,'isVip':isVip},
dataType: "json",
success: function (data) {
if (data.code == 200) {
window.location.href = '/author/index_list.html?bookId='+bookId;
} else {
lock = false;
$("#LabErr").html(data.msg);
}
},
error: function () {
lock = false;
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,209 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css"/>
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4 on" href="/author/index.html">作品管理</a></li>
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="userBox cf">
<form method="post" action="./register.html" id="form2">
<div class="user_l">
<div></div>
<h3>小说章节内容填写</h3>
<ul class="log_list">
<li><span id="LabErr"></span></li>
<b>章节名:</b>
<li><input type="text" id="bookIndex" name="bookIndex" class="s_input" ></li>
<b>章节内容:</b>
<li id="contentLi">
<textarea name="bookContent" rows="30" cols="80" id="bookContent"
class="textarea"></textarea>
</li>
<li style="margin-top: 10px"><input type="button" onclick="addBookContent()" name="btnRegister" value="提交"
id="btnRegister" class="btn_red">
</li>
</ul>
</div>
</form>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var bookId = getSearchString("bookId");
var indexId = getSearchString("indexId");
var indexName = decodeURI(decodeURI(getSearchString("indexName")));
var isVip = getSearchString("isVip");
$("#bookIndex").val(indexName);
if(isVip == 1){
$("#contentLi").after("<b>是否收费</b>\n" +
" <li><input type=\"radio\" disabled name=\"isVip\" value=\"0\" >免费\n" +
" <input type=\"radio\" disabled name=\"isVip\" value=\"1\" checked >收费</li><br/>");
}else{
$("#contentLi").after("<b>是否收费:</b>\n" +
" <li><input type=\"radio\" disabled name=\"isVip\" value=\"0\" checked >免费\n" +
" <input type=\"radio\" disabled name=\"isVip\" value=\"1\" >收费</li><br/>");
}
$.ajax({
type: "get",
url: "/author/queryIndexContent/"+indexId,
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
$("#bookContent").html(data.data);
} else {
layer.alert(data.msg);
}
},
error: function () {
lock = false;
layer.alert('网络异常');
}
})
var lock = false;
function addBookContent() {
if(lock){
return;
}
lock = true;
var indexName = $("#bookIndex").val();
if(!indexName){
$("#LabErr").html("章节名不能为空!");
lock = false;
return;
}
var content = $("#bookContent").val();
if(!content){
$("#LabErr").html("章节内容不能为空!");
lock = false;
return;
}
$.ajax({
type: "POST",
url: "/author/updateBookContent",
data: {'indexId':indexId,'indexName':indexName,'content':content},
dataType: "json",
success: function (data) {
if (data.code == 200) {
window.location.href = '/author/index_list.html?bookId='+bookId;
} else {
lock = false;
$("#LabErr").html(data.msg);
}
},
error: function () {
lock = false;
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,330 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css"/>
<style type="text/css">
.redBtn {
padding: 5px;
border-radius: 20px;
border: 1px solid #3eaf7c;
background: #3eaf7c;
color: #fff;
}
a.redBtn:hover {
color: #fff;
}
</style>
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div id="noContentDiv">
<div class="tc" style="margin-top: 200px"><a href="/author/book_add.html" class="btn_red">创建作品</a></div>
</div>
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
<div class="title cf">
<h2 class="fl">小说列表</h2>
<div class="fr"><a href="/author/book_add.html" class="btn_red">发布小说</a></div>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="goread">
书名
</th>
<th class="goread">
分类
</th>
<th class="goread">
点击量
</th>
<th class="goread">
昨日订阅数
</th>
<th class="goread">
更新时间
</th>
<th class="goread">
总字数
</th>
<th class="goread">
操作
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/javascript/ajaxfileupload.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/date.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 5);
function search(curr, limit) {
$.ajax({
type: "get",
url: "/author/listBookByPage",
data: {'curr': curr, 'limit': limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
$("#hasContentDiv").css("display", "block");
$("#noContentDiv").css("display", "none");
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
bookListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
/* " <td class=\"style bookclass\">\n" +
" ["+(i+1)+"]\n" +
" </td>\n" +*/
" <td style=\"position: relative\" class=\"goread\">\n" +
"<input class=\"opacity\" onchange=\"picChange('" + book.id + "'," + i + ")\"\n" +
" type=\"file\" id=\"file" + i + "\" name=\"file\"\n" +
" title=\"点击上传图片\"\n" +
" style=\"z-index: 100;cursor: pointer;left: 30px; top: 0px; width: 60px; height: 80px; opacity: 0; position: absolute; \"\n" +
" />" +
"<img width='50' height='70' src='" + book.picUrl + "'/><br/>" +
" " + book.bookName + "</td>\n" +
" <td class=\"goread\" >"
+ book.catName + "</td>\n" +
" <td class=\"goread\" valsc=\"291|2037554|1\">"
+ book.visitCount + "</td>\n" +
" <td class=\"goread\" valsc=\"291|2037554|1\">"
+ book.yesterdayBuy + "</td>\n" +
" <td class=\"goread\">\n" +
" " + new Date(Date.parse(book.lastIndexUpdateTime ? book.lastIndexUpdateTime : book.updateTime)).Format("yyyy-MM-dd hh:mm") + "更新\n" +
" </td>\n" +
" <td class=\"goread\" valsc=\"291|2037554|1\">"
+ book.wordCount + "</td>\n" +
" <td class=\"goread\" id='opt" + book.id + "'>" +
"<a target='_blank' class='redBtn' href='/author/index_list.html?bookId=" + book.id + "'>章节管理 </a><br/>" +
"<a target='_blank' href='/author/author_income_detail.html?bookId=" + book.id + "'>薪酬查询 </a><br/>" +
"<a target='_blank' href='/book/" + book.id + ".html'>作品信息</a>" +
"</td> </tr>");
}
$("#bookList").html(bookListHtml);
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('网络异常');
}
})
}
function updateBookStatus(bookId, status) {
$.ajax({
type: "POST",
url: "/author/updateBookStatus",
data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function picChange(bookId, i) {
var file = $("#file" + i).val(); //文件名称
if (file != "") {
if (checkPicUpload($("#file" + i)[0])) {
$.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议一般设置为false
fileElementId: "file" + i, //文件上传域的ID
dataType: "json", //返回值类型 一般设置为json
type: "post",
success: function (data) { //服务器成功响应处理函数
if (data.code == 200) {
$.ajax({
type: "POST",
url: "/author/updateBookPic",
data: {'bookId': bookId, 'bookPic': data.data},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else {
lock = false;
layer.alert(data.msg);
}
},
error: function () {
lock = false;
layer.alert('网络异常');
}
})
} else {
layer.alert(data.msg);
}
}
});
}
} else {
alert("请选择上传文件!");
}
}
</script>
</html>

View File

@ -0,0 +1,330 @@
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css"/>
<style type="text/css">
.redBtn {
padding: 5px;
border-radius: 20px;
border: 1px solid #3eaf7c;
background: #3eaf7c;
color: #fff;
}
a.redBtn:hover {
color: #fff;
}
</style>
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_4 on" href="/author/index.html">作品管理</a></li>
<li><a class="link_2 " href="/author/author_income_detail.html">稿费收入</a></li>
</ul>
</div>
<div class="my_r">
<div id="noContentDiv">
<div class="tc" style="margin-top: 200px"><a href="javascript:addContent()" class="btn_red">新建章节</a>
</div>
</div>
<div class="my_bookshelf" id="hasContentDiv" style="display: none">
<div class="title cf">
<h2 class="fl">章节列表</h2>
<div class="fr"><a href="javascript:addContent()" class="btn_red">新建章节</a></div>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<!-- <th class="style">
序号
</th>-->
<th class="name">
章节名
</th>
<th class="goread">
更新时间
</th>
<th class="goread">
是否收费
</th>
<th class="goread">
操作
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script src="/javascript/date.js" type="text/javascript"></script>
<script src="/javascript/common.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
var bookId = getSearchString("bookId");
var indexCount = 0;
search(1, 5);
function search(curr, limit) {
$.ajax({
type: "get",
url: "/book/queryIndexList",
data: {'bookId': bookId, 'curr': curr, 'limit': limit, 'orderBy': 'index_num desc'},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
indexCount = bookList.length;
$("#hasContentDiv").css("display", "block");
$("#noContentDiv").css("display", "none");
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
bookListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
/* " <td class=\"style bookclass\">\n" +
" ["+(i+1)+"]\n" +
" </td>\n" +*/
" <td id='name" + book.id + "' class=\"name\">\n" +
" " + book.indexName + "</td>\n" +
" <td class=\"goread\">\n" +
" " + new Date(Date.parse(book.updateTime)).Format("yyyy-MM-dd hh:mm") + "<br/>更新\n" +
" </td>\n" +
" <td class=\"goread\" valsc=\"291|2037554|1\">"
+ (book.isVip == 1 ? '收费' : '免费') + "</td>\n" +
" <td class=\"goread\" id='opt" + book.id + "'>" +
"<a class='redBtn' href='javascript:updateIndex(\"" + book.id + "\"," + book.isVip + ")'>修改 </a><br/>" +
"<a href='javascript:deleteIndex(\"" + book.id + "\")'>删除 </a><br/>" +
"</td> </tr>");
}
$("#bookList").html(bookListHtml);
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('网络异常');
}
})
}
function addContent() {
location.href = "/author/content_add.html?indexCount=" + indexCount + "&bookId=" + bookId;
}
function updateIndex(indexId, isVip) {
var indexName = $.trim($("#name" + indexId).text());
location.href = "/author/content_update.html?bookId=" + bookId
+ "&indexId=" + indexId
+ "&indexName=" + encodeURI(encodeURI(indexName))
+ "&isVip=" + isVip;
/*
var indexName = $("#name"+indexId).text();
var htmlStr = "<input type=\"text\" value=\""+$.trim(indexName)+"\">";
$("#name"+indexId).html(htmlStr);
$("#name"+indexId).find("input").focus();
$("#name"+indexId).find("input").select();
$("#name"+indexId).find("input").keyup(function(event){
if(event.keyCode ==13){
$(this).blur();
}
});
$("#name"+indexId).find("input").blur(function () {
var indexName = $(this).val();
$.ajax({
type: "POST",
url: "/author/updateIndexName",
data: {'indexId':indexId,'indexName':indexName},
dataType: "json",
success: function (data) {
if (data.code == 200) {
$("#name"+indexId).html(indexName);
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
});*/
}
function deleteIndex(indexId) {
layer.confirm('确认要删除吗删除后数据无法找回', {
btn: ['确定', '取消']//按钮
}, function (index) {
layer.close(index);
$.ajax({
type: "delete",
url: "/author/deleteIndex/"+indexId,
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
});
}
</script>
</html>

View File

@ -0,0 +1,169 @@
<!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 id="Head1"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>
申请作者
</title><link rel="stylesheet" type="text/css" href="/css/easyui.css" />
<link href="/css/public.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/javascript/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="/javascript/jquery.easyui.min.js"></script>
<script type="text/javascript" src="/javascript/easyui-lang-zh_CN.js"></script>
<script src="/javascript/YT.js" type="text/javascript"></script>
<style type="text/css">
.ipage a
{
border: 1px dotted #cccccc;
color: #555555;
display: block;
float: left;
height: 30px;
line-height: 30px;
margin: 0 15px 0 0;
text-align: center;
width: 122px;
}
.ipage a:hover,.ahover
{
background-color: #fff; color: #f00!important; border:1px solid #f00!important
}
</style>
<script src="/javascript/ycUtils.js" type="text/javascript"></script>
</head>
<body style="background-color: #444;">
<div style="width: 800px; margin-left: auto; margin-right: auto; margin-top: 150px;">
<form method="post" action="/author/register.html" id="form1" onsubmit="return $(this).form(&quot;validate&quot;);">
<div id="main">
<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic" style="line-height:40px;">
<tr>
<td colspan="3" style="text-align: left;">
<div style="padding-left: 15px; height: 40px; line-height: 40px;">
我是网络小说写手,我要注册为小说精品屋签约作者:</div>
</td>
</tr>
<tr><td align="right">邀请码:</td><td><input name="inviteCode" th:value="${author.inviteCode}" type="text" maxlength="12" id="TxtGetCode" class="easyui-validatebox inpMain" data-options="required:true" /></td>
<td>
<span class="notes"> *</span> 小说精品屋分配给作者的邀请码
</td>
</tr>
<tr>
<td align="right">
作者笔名:
</td>
<td>
<input name="penName" th:value="${author.penName}" type="text" maxlength="8" id="TxtNiceName" class="easyui-validatebox inpMain" data-options="required:true" validType="checkPenName" />
</td>
<td>
<span class="notes"> *</span> 长度为2到8位的中英文
</td>
</tr>
<tr>
<td align="right">
手机号码:
</td>
<td>
<input name="telPhone" th:value="${author.telPhone}" type="text" id="TxtMobile" class="easyui-validatebox inpMain" data-options="required:true" validType="chinaMobile" />
</td>
<td>
<span class="notes"> *</span> 小说精品屋的编辑会通过这个号码与您联系
</td>
</tr>
<tr>
<td align="right">
QQ或微信
</td>
<td>
<input name="chatAccount" th:value="${author.chatAccount}" type="text" id="TxtQQ" class="easyui-validatebox inpMain" data-options="required:true" />
</td>
<td>
<span class="notes"> *</span> 小说精品屋的编辑会通过这个号码与您联系
</td>
</tr>
<tr>
<td align="right">
电子邮箱:
</td>
<td>
<input name="email" th:value="${author.email}" type="text" id="TxtEmail" class="easyui-validatebox inpMain w300" data-options="required:true" validType="email" />
</td>
<td>
<span class="notes"> *</span> 长度为2到15位的中英文数字
</td>
</tr>
<tr>
<td align="right">
男女主角:
</td>
<td>
<div>
<ul class="ipage">
<input type="hidden" name="workDirection" id="HidSexclass" /><!-- th:attr="class=${author.workDirection} == '0'? 'ahover':''"-->
<a href="javascript:void(0);" val="0">男性主角选男频</a>
<a href="javascript:void(0);" val="1">
女性主角选女频</a>
<div class="clear">
</div>
</ul>
</div>
</td>
<td>
<span class="notes"> *</span> 请选择作品方向
</td>
</tr>
</table>
</div>
<table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
<tr>
<td>
<div style="padding-left: 110px; margin-top: 10px; margin-bottom: 5px;">
<input type="submit" name="btnSubmit" value="立即开始您的作者生涯" id="btnSubmit" class="btnGray" />
</div>
</td>
</tr>
<tr>
<td>
<span id="LabErr" th:text="${LabErr}"></span>
</td>
</tr>
</table>
<input type="hidden" name="HidUId" id="HidUId" value="1095" />
</form>
</div>
<script language="javascript" type="text/javascript">
$(function () {
$(".ipage a").click(function () {
$(".ipage a").each(function () {
$(this).removeClass("ahover");
});
$(this).addClass("ahover");
$("#HidSexclass").val($(this).attr("val"));
$("#btnSubmit").removeAttr("disabled");
$("#btnSubmit").removeClass("btnGray");
$("#btnSubmit").addClass("btn");
});
var sexClass = $("#HidSexclass").val();
if (sexClass == 1 || sexClass == 2) {
$(".ipage a").each(function () {
$(this).removeClass("ahover");
if (sexClass == $(this).attr("val")) {
$(this).addClass("ahover");
}
});
$("#btnSubmit").removeClass("btnGray");
$("#btnSubmit").addClass("btn");
}
else {
$("#btnSubmit").attr("disabled", "disabled");
}
});
</script>
</body>
</html>

View File

@ -0,0 +1,190 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="${book.bookName}+'作品评论区_'+${application.website.name}"></title>
<meta name="keywords" th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'" />
<meta name="description" th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'" />
<link href="/css/main.css" rel="stylesheet" />
<link href="/css/book.css" rel="stylesheet" />
</head>
<body>
<input type="hidden" id="bookId" th:value="${book.id}"/>
<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf mb50">
<div class="channelBookContent cf">
<!--left start-->
<div class="wrap_left fl">
<div class="wrap_bg">
<div class="pad20">
<div class="bookComment">
<div class="book_tit">
<div class="fl">
<h3>作品评论区</h3><span id="bookCommentTotal">(0条)</span>
</div>
<a class="fr" href="#txtComment">发表评论</a>
</div>
<div class="no_comment" id="noCommentPanel" style="display: none;">
<img src="/images/no_comment.png" alt="" />
<span class="block">暂无评论</span>
</div>
<div class="commentBar" id="commentPanel">
</div>
<div class="pageBox cf mt15 mr10" id="commentPage">
</div>
<div class="reply_bar" id="reply_bar">
<div class="tit">
<span class="fl font16">发表评论</span>
<!--未登录状态下不可发表评论,显示以下链接-->
<span class="fr black9" style="display:none; ">请先 <a class="orange" href="/user/login.html">登录</a><em class="ml10 mr10">|</em><a class="orange" href="/user/register.html">注册</a></span>
</div>
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text" placeholder="我来说两句..."></textarea>
<div class="reply_btn">
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
<span class="fr"><a class="btn_ora" href="javascript:void(0);" onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
</div>
</div>
</div>
</div>
</div>
</div>
<!--left end-->
<!--right start-->
<div class="wrap_right fr">
<div class="wrap_inner author_info mb20">
<div class="author_head cf">
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
id="authorLogoImg"/></a>
<div class="msg">
<span class="icon_qyzz">签约作家</span>
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
th:text="${book.authorName}"></a></h4>
</div>
</div>
<div class="author_intro cf">
<h4>作者有话说</h4>
<div class="intro_txt" id="authorNote">
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
</div>
</div>
<!--如果作者没有其他作品就下方代码整个不显示-->
</div>
<!--作者专栏e-->
<script type="text/javascript">
var authorUId=8;
if(authorUId==0)
{$("#authorPanel").hide();}
else
{
}
</script>
</div>
<!--right end-->
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
$('#txtComment').on('input propertychange', function () {
var count = $(this).val().length;
$('#emCommentNum').html(count + "/1000");
if (count > 1000) {
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
}
});
searchComments(1, 20);
function searchComments(curr, limit) {
$.ajax({
type: "get",
url: "/book/listCommentByPage",
data: {'bookId': $("#bookId").val(),'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var commentList = data.data.list;
if (commentList.length > 0) {
$("#bookCommentTotal").html("("+data.data.total+")");
var commentListHtml = "";
for (var i = 0; i < commentList.length; i++) {
var comment = commentList[i];
commentListHtml += ("<div class=\"comment_list cf\">" +
"<div class=\"user_heads fl\" vals=\"389\">" +
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName.substr(0, 4) + "****" + comment.createUserName.substr(comment.createUserName.length - 3, 3))+"</li><li class=\"dec\">" +
comment.commentContent+
"</li><li class=\"other cf\">" +
"<span class=\"time fl\">"+comment.createTime+"</span>" +
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
"</span></li>\t\t</ul>\t</div>");
}
$("#commentPanel").html(commentListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'commentPage' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
searchComments(obj.curr, obj.limit);
} else {
}
}
});
});
}
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</body>
</html>

View File

@ -0,0 +1,401 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'_'+${bookIndex.indexName}+'_'+${application.website.name}"></title>
<meta name="keywords"
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节,'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
<meta name="description"
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'"/>
<link rel="stylesheet" href="/css/read.css"/>
<link href="/css/book.css" rel="stylesheet"/>
</head>
<link href="/layui/css/layui.css" rel="stylesheet"/>
<style type="text/css">
.screen_toolbar {
position: fixed;
width: 100%;
left: 0px;
bottom: 0px;
text-align: center;
z-index: 100;
}
</style>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
<script type="text/javascript">
BookDetail.SetReadFontFamilyClear(0);
var font = localStorage.getItem("fonts");
var colorNum = localStorage.getItem("colorNum");
var fontNum = localStorage.getItem("fontNum");
</script>
<body class="read_style_1" oncontextmenu="return false" onselectstart="return false"
ondragstart="return false" onbeforecopy="return false" oncopy="document.selection.empty()"
onselect="document.selection.empty()">
<input type="hidden" id="bookId" th:value="${book.id}"/>
<input type="hidden" id="bookName" th:value="${book.bookName}"/>
<input type="hidden" id="preIndexName" th:value="${bookIndex.indexName}"/>
<input type="hidden" id="preContentId" th:value="${bookIndex.id}"/>
<input type="hidden" id="preIndexId" th:value="${preBookIndexId}"/>
<input type="hidden" id="nextIndexId" th:value="${nextBookIndexId}"/>
<input type="hidden" id="logo" th:value="${application.website.logo}"/>
<input type="hidden" id="logoDark" th:value="${application.website.logoDark}"/>
<div th:replace="common/top :: top('10')">
</div>
<div id="showDetail">
<div class="readBody cf">
<div class="readMain cf">
<div class="read_menu">
<div class="menu_left" style="">
<ul>
<li><a class="ico_catalog" th:href="'/book/indexList-'+${book.id}+'.html'" title="目录">
<b>目录</b></a></li>
<li><a class="ico_page" th:href="'/book/'+${book.id}+'.html'" title="返回书页"><b>书页</b></a></li>
<li class="li_shelf" id="cFavs"><a class="ico_shelf" href="javascript:void(0);" title="加入书架"
onclick="javascript:BookDetail.AddFavorites(37,1959973,1);"><b>加书架</b></a>
</li>
<li class="li_shelfed" style="display: none;"><a class="ico_shelfed" href="javascript:void(0);"
title="已收藏"><b>已收藏</b></a></li>
<li><a class="ico_comment" th:href="'/book/comment-'+${book.id}+'.html'" title="评论">
<b>评论</b></a></li>
<li><a class="ico_setup" href="javascript:void(0);" title="设置"><b>设置</b></a></li>
</ul>
</div>
<div class="menu_right" style="position: fixed; bottom: 0">
<ul>
<li><a class="ico_pagePrev"
th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'"
title="上一章"><i>上一章</i></a></li>
<li><a class="ico_pageNext"
th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'"
title="下一章"><i>下一章</i></a></li>
</ul>
</div>
</div>
<div class="readWrap">
<div class="bookNav">
<a href="/">首页 </a>&gt; <a th:href="'/book/bookclass.html?c='+${book.catId}"
th:text="${book.catName}">
</a>&gt; <a th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}">
</a>
</div>
<div id="readcontent">
<div class="textbox cf">
<div class="book_title">
<h1 th:utext="${bookIndex.indexName}">
</h1>
<div class="textinfo">
类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>
作者:<a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
th:utext="${book.authorName}"></a><span
th:text="'字数'+${bookIndex.wordCount}"></span><span
th:text="'更新时间'+${#dates.format(bookIndex.updateTime, 'yy/MM/dd HH:mm:ss')}"></span>
</div>
</div>
<div class="txtwrap" th:if="${needBuy}">
<div id="showReading" class="readBox" style="font-size: 16px; font-family: microsoft yahei">
<p>
</p>
<div class="pc_bar" style="display: none;">
<a href="javascript:void(0);" class="icon_pc"
onclick="javascript:uFans.startSupportRead();">
<span><i class="icon_yb"></i><em>捧场</em></span>
</a>
</div>
</div>
<div id="showBooking" class="orderBox">
<h3>此章为VIP章节需要订阅后才能继续阅读</h3>
<form method="post" action="./2052117.html?bid=302&amp;cid=2052117" id="Form1">
<ul class="order_list">
<li>价格:<span class="red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span>
</li>
<li id="panelPay" class="btns"><a class="btn_red"
href="javascript:buyBookIndex()">购买</a></li>
</ul>
<input type="hidden" name="HidCId" id="HidCId" value="2052117">
<input type="hidden" name="HidBId" id="HidBId" value="302">
<input type="hidden" name="HidCRank" id="HidCRank" value="49">
</form>
</div>
</div>
<div class="txtwrap" th:if="${!needBuy}">
<div id="showReading" class="readBox" style="font-size: 16px; font-family: microsoft yahei"
th:utext="${bookContent.content}">
<div class="pc_bar" style="display: none;">
<a href="javascript:void(0);" class="icon_pc"
onclick="javascript:uFans.startSupportRead();">
<span><i class="icon_yb"></i><em>捧场</em></span>
</a>
</div>
</div>
</div>
</div>
</div>
<div class="nextPageBox">
<a class="prev"
th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
<a class="dir" th:href="'/book/indexList-'+${book.id}+'.html'"
>目录</a> <a class="next"
th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
</div>
</div>
</div>
</div>
<div class="readPopup qrBox" style="display: none">
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.qrBox').hide();"></a>
<div class="popupTit">
<h3>手机阅读</h3>
</div>
<div class="qrList">
<ul>
</ul>
</div>
</div>
<div class="readPopup setupBox" style="display: none;">
<a class="closePopup" href="javascript:void(0);" onclick="javascript:$('.maskBox,.setupBox').hide();"></a>
<div class="popupTit">
<h3>设置</h3>
</div>
<div class="setupList">
<ul>
<li class="readTheme">
<em class="tit">阅读主题:</em>
<a id="setup_color_white" class="white current"
href="javascript:void(0);" title="白色" onclick="javascript:BookDetail.SetBackUpColor(1);"></a><a
id="setup_color_green" class="green" href="javascript:void(0);" title="绿色"
onclick="javascript:BookDetail.SetBackUpColor(2);"></a><a id="setup_color_pink" class="pink"
href="javascript:void(0);" title="粉色"
onclick="javascript:BookDetail.SetBackUpColor(3);"></a><a
id="setup_color_yellow" class="yellow" href="javascript:void(0);" title="黄色"
onclick="javascript:BookDetail.SetBackUpColor(4);"></a><a id="setup_color_gray" class="gray"
href="javascript:void(0);" title="灰色"
onclick="javascript:BookDetail.SetBackUpColor(5);"></a><a
id="setup_color_night" class="night" href="javascript:void(0);" title="夜间"
onclick="javascript:BookDetail.SetBackUpColor(6);"></a></li>
<li class="setFont setBtn"><em class="tit">正文字体:</em> <a id="setup_font_yahei" class="setYahei current"
href="javascript:void(0);"
onclick="javascript:BookDetail.SetReadFontFamily(0);">雅黑</a>
<a id="setup_font_simsun" class="setSimsun" href="javascript:void(0);"
onclick="javascript:BookDetail.SetReadFontFamily(1);">宋体</a> <a id="setup_font_ks" class="setKs"
href="javascript:void(0);"
onclick="javascript:BookDetail.SetReadFontFamily(2);">楷书</a>
</li>
<li class="fontSize setBtn"><em class="tit">字体大小:</em> <a class="small" href="javascript:void(0);"
onclick="javascript:BookDetail.SetReadFont(-2);">A-</a><span
class="current_font"
id="cFonts">
16</span><a class="big" href="javascript:void(0);"
onclick="javascript:BookDetail.SetReadFont(2);">A+</a></li>
</ul>
</div>
</div>
</div>
<div class="maskBox" style="display: none">
</div>
<div id="showError">
<span id="LabErrorStatus"></span>
</div>
<div class="maskBox" style="display: none" onclick="javascript:uFans.closeBox();"></div>
<div class="readPopup pcBox" style="display: none" id="showPC"></div>
<div class="readPopup flowerBox" style="display: none" id="showFlower"></div>
<div class="readPopup newsTipBox" style="display: none;" id="showNote"></div>
<!--
<div id="screenInput" class="screen_toolbar" >
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md4 layui-col-lg4"></div>
<div class="layui-col-xs6 layui-col-sm4 layui-col-md4 layui-col-lg4">
<input type="text" id="screenBulletText" required lay-verify="required" placeholder="请输入弹幕内容,右下角开关可控制弹幕是否开启" autocomplete="off"
class="layui-input">
</div>
<div class="layui-col-xs2 layui-col-sm1 layui-col-md1 layui-col-lg1">
<button class="layui-btn layui-btn-danger send">发送</button>
</div>
</div>
<form id="screenSwitch" class="layui-form">
<div class="layui-form-item" style="position: fixed;right: 0px;bottom: 100px" title="弹幕开关">
&lt;!&ndash; <label class="layui-form-label" style="opacity:0.5;font-weight: bold;color: red;">弹幕</label>&ndash;&gt;
<div class="layui-input-block">
<input class="clear" type="checkbox" name="switch" lay-skin="switch">
</div>
</div>
</form>-->
<script language="javascript" type="text/javascript">
var logo = $("#logo").val();
var logoDark = $("#logoDark").val();
if (font) {
$(".readBox").css("font-size", font + "px");
$("#cFonts").html(font);
$("#ChapterBody").attr("class", "article-content font" + font);
BookDetail.reShowCover();
}
if (fontNum) {
BookDetail.SetReadFontFamily(fontNum);
}
if (colorNum) {
BookDetail.SetBackUpColor(colorNum);
if (colorNum == 6) {
$(".logo img").attr("src", logoDark);
}
}
//查询是否在书架
$.ajax({
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId': $("#bookId").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if (data.data) {
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
}
//添加阅读记录
$.ajax({
type: "POST",
url: "/user/addReadHistory",
data: {'bookId': $("#bookId").val(), 'preContentId': $("#preContentId").val()},
dataType: "json",
success: function (data) {
},
error: function () {
}
})
} else if (data.code == 1001) {
//未登录
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
var bookId = $("#bookId").val();
var indexId = $("#preContentId").val();
var preIndexId = $("#preIndexId").val();
var nextIndexId = $("#nextIndexId").val();
$(function () {
BookDetail.GetReadSet(bookId, indexId, preIndexId, nextIndexId, 1);
$(".ico_setup").click(function () {
$(".maskBox,.setupBox").show();
});
$(".ico_phone").click(function () {
$(".maskBox,.qrBox").show();
});
$(window).scroll(function () {
var vtop = $(document).scrollTop();
var vbottom = $(document).height() - vtop - $(window).height();
if (vtop > 50) {
$(".menu_left").css("position", "fixed");
$(".menu_left").css("top", "2px");
} else {
$(".menu_left").css("position", "absolute");
$(".menu_left").css("top", "60px")
}
if (vbottom < 150) {
$(".menu_right").css("position", "absolute");
$(".menu_right").css("bottom", "150px");
} else {
$(".menu_right").css("position", "fixed");
$(".menu_right").css("bottom", "2px");
}
});
var bgClass = '1';
if (bgClass == 6) {
$(".logo img").attr("src", logoDark);
}
$(".readTheme a").click(function () {
$(".logo img").attr("src", logo);
})
$("#setup_color_night").click(function () {
$(".logo img").attr("src", logoDark);
});
});
function enterPreIndexPage(bookId, bookIndexId) {
if (bookIndexId != 0) {
window.location.href = '/book/' + bookId + '/' + bookIndexId + ".html";
} else {
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
function enterNextIndexPage(bookId, bookIndexId) {
if (bookIndexId != 0) {
window.location.href = '/book/' + bookId + '/' + bookIndexId + ".html";
} else {
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
function buyBookIndex() {
$.ajax({
type: "POST",
url: "/user/buyBookIndex",
data: {
'bookId': $("#bookId").val(), "bookName": $("#bookName").val(),
"bookIndexId": $("#preContentId").val(), "bookIndexName": $("#preIndexName").val()
},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
$.post("/book/addVisitCount", {"bookId": $("#bookId").val()}, function () {
});
</script>
</body>
</html>

View File

@ -0,0 +1,353 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'_'+${book.authorName}+'_'+${book.bookName}+'txt下载'+'_'+${book.bookName}+'无弹窗_'+${application.website.name}"></title>
<meta name="keywords"
th:content="${book.bookName}+'官方首发,'+${book.bookName}+'小说,'+${book.bookName}+'最新章节'+${book.bookName}+'txt下载,'+${book.bookName}+'无弹窗,'+${book.bookName}+'吧,'+${book.bookName}+'离线完本'"/>
<meta name="description"
th:content="${book.bookName}+','+${book.bookName}+'小说阅读,'+${book.bookName}+'由作家'+${book.authorName}+'创作,'+${application.website.name}+'提供'+${book.bookName}+'首发最新章节及txt下载,'+${book.bookName}+'最新更新章节,精彩尽在'+${application.website.name}+'。'"/>
<link rel="stylesheet" href="/css/main.css"/>
<link href="/css/book.css?v=2019" rel="stylesheet"/>
</head>
<body>
<input type="hidden" id="lastBookIndexId" th:value="${book.lastIndexId}"/>
<input type="hidden" id="bookCatId" th:value="${book.catId}"/>
<input type="hidden" id="bookId" th:value="${book.id}"/>
<input type="hidden" id="preContentId" th:value="${firstBookIndexId}"/>
<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf mb50">
<div class="nav_sub">
<a href="/" th:text="${application.website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>
</div>
<div class="channelWrap channelBookInfo cf">
<div class="bookCover cf">
<a th:href="${book.picUrl}" class="book_cover"><img class="cover" th:src="${book.picUrl}"
th:attr="alt=${book.bookName}"/></a>
<div class="book_info">
<div class="tit">
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>--><a class="author"
th:utext="${book.authorName}+' '"></a>
</div>
<ul class="list">
<li><span class="item">类别:<em th:text="${book.catName}"></em></span>
<span class="item" th:switch="${book.bookStatus}">状态:<em th:case="'0'">连载中</em><em th:case="*">已完结</em></span>
<span class="item">总点击:<em id="cTotal" th:text="${book.visitCount}"></em></span>
<span class="item">总字数:<em th:text="${book.wordCount}"></em></span></li>
</ul>
<div class="intro_txt">
<p th:utext="${book.bookDesc}"></p>
<a class="icon_hide" href="javascript:void(0)" onclick=""><i></i>收起</a>
<a class="icon_show" href="javascript:void(0)" onclick=""><i></i>展开</a>
</div>
<div class="btns" id="optBtn">
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" class="btn_ora">点击阅读</a>
<span id="cFavs"><a href="javascript:void(0);" class="btn_ora_white btn_addsj"
onclick="javascript:BookDetail.AddFavorites(37,0,0);">加入书架</a>
</span>
</div>
</div>
</div>
</div>
<div class="channelBookContent cf">
<!--left start-->
<div class="wrap_left fl">
<div class="wrap_bg">
<!--章节目录 start-->
<div class="pad20_nobt">
<div class="bookChapter">
<div class="book_tit">
<div class="fl">
<h3>最新章节</h3><span id="bookIndexCount">(0章)</span></div>
<a class="fr" th:href="'/book/indexList-'+${book.id}+'.html'">全部目录</a>
</div>
<ul class="list cf">
<li>
<span class="fl font16"> <a th:href="'/book/'+${book.id}+'/'+${book.lastIndexId}+'.html'" th:utext="${book.lastIndexName}"><!--<i class="vip">VIP</i>--></a></span>
<span class="black9 fr"
th:text="'更新时间'+${#dates.format(book.lastIndexUpdateTime, 'yy/MM/dd HH:mm:ss')}"></span>
</li>
<li class="zj_yl" id="lastBookContent">  </li>
<!--此处是该章节预览截取最前面的42个字-->
</ul>
</div>
</div>
<!--章节目录 end-->
<!--作品评论区 start-->
<div class="pad20">
<div class="bookComment">
<div class="book_tit">
<div class="fl">
<h3>作品评论区</h3><span id="bookCommentTotal" th:text="'('+${bookCommentPageBean.total}+')'"></span>
</div>
<a class="fr" href="#txtComment">发表评论</a>
</div>
<div class="no_comment" id="noCommentPanel" th:style="${bookCommentPageBean.total > 0}? 'display:none'" >
<img src="/images/no_comment.png" alt=""/>
<span class="block">暂无评论</span>
</div>
<div class="commentBar" id="commentPanel" th:style="${bookCommentPageBean.total == 0}? 'display:none'">
<div th:each="comment: ${bookCommentPageBean.list}" class="comment_list cf"><div class="user_heads fl" vals="389"><img th:src="${comment.createUserPhoto}?${comment.createUserPhoto}:'/images/man.png'" class="user_head" alt=""><span class="user_level1" style="display: none;">见习</span></div><ul class="pl_bar fr"> <li class="name" th:text="${#strings.substring(comment.createUserName,0,4)}+'****'+${#strings.substring(comment.createUserName,#strings.length(comment.createUserName)-3,#strings.length(comment.createUserName))}"></li><li class="dec" th:utext="${comment.commentContent}"></li><li class="other cf"><span class="time fl" th:text="${#calendars.format(comment.createTime, 'yyyy-MM-dd HH:mm:ss')}"></span><span class="fr"><a href="javascript:void(0);" onclick="javascript:BookDetail.AddAgreeTotal(77,this);" class="zan" style="display: none;">赞<i class="num">(0)</i></a></span></li> </ul> </div>
</div>
<!--无评论时此处隐藏-->
<div class="more_bar" id="moreCommentPanel" th:style="${bookCommentPageBean.total == 0}? 'display:none'">
<a th:href="'/book/comment-'+${book.id}+'.html'">查看全部评论&gt;</a>
</div>
<div class="reply_bar" id="reply_bar">
<div class="tit">
<span class="fl font16">发表评论</span>
<!--未登录状态下不可发表评论,显示以下链接-->
<span class="fr black9" style="display:none; ">请先 <a class="orange"
href="/user/login.html">登录</a><em
class="ml10 mr10">|</em><a class="orange"
href="/user/register.html">注册</a></span>
</div>
<textarea name="txtComment" rows="2" cols="20" id="txtComment" class="replay_text"
placeholder="我来说两句..."></textarea>
<div class="reply_btn">
<span class="fl black9"><em class="ml5" id="emCommentNum">0/1000</em> 字</span>
<span class="fr"><a class="btn_ora" href="javascript:void(0);"
onclick="javascript:BookDetail.SaveComment(37,0,$('#txtComment').val());">发表</a></span>
</div>
</div>
</div>
</div>
<!--作品评论区 end-->
</div>
</div>
<!--left end-->
<!--right start-->
<div class="wrap_right fr">
<script src="/javascript/authorinfo.js?uid=8" type="text/javascript"></script>
<!--作者专栏s-->
<div class="wrap_inner author_info mb20">
<div class="author_head cf">
<a href="javascript:void(0);" class="head"><img src="/images/author_head.png" alt="作者头像"
id="authorLogoImg"/></a>
<div class="msg">
<span class="icon_qyzz">签约作家</span>
<h4><a th:href="'javascript:searchByK(\''+${book.authorName}+'\')'"
th:utext="${book.authorName}"></a></h4>
</div>
</div>
<div class="author_intro cf">
<h4>作者有话说</h4>
<div class="intro_txt" id="authorNote">
亲亲们,你们的支持是我最大的动力!求点击、求推荐、求书评哦!
</div>
</div>
<!--如果作者没有其他作品就下方代码整个不显示-->
</div>
<!--作者专栏e-->
<script type="text/javascript">
var authorUId = 8;
if (authorUId == 0) {
$("#authorPanel").hide();
} else {
}
</script>
<div id="RelateBookOther" class="wrap_inner wrap_right_cont mb20">
<div class="title cf">
<h3 class="on">同类推荐</h3>
</div>
<div class="tj_bar">
<ul id="recBookList">
<li th:each="book : ${recBooks}">
<div class="book_intro">
<div class="cover">
<a th:href="'/book/'+${book.id}+'.html'"><img th:src="${book.picUrl}" th:alt="${book.bookName}"></a>
</div>
<div class="dec">
<a class="book_name" th:href="'/book/'+${book.id}+'.html'" th:text="${book.bookName}"></a>
<a class="txt" th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookDesc}">
</a>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
<!--right end-->
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js?v=1.1" type="text/javascript"></script>
<script src="/javascript/ufans.js?v=1" type="text/javascript"></script>
<div class="maskBox" style="display:none" onclick="javascript:uFans.closeBox();"></div>
<div class="readPopup pcBox" style="display:none" id="showPC"></div>
<div class="readPopup flowerBox" style="display:none" id="showFlower"></div>
<div class="readPopup newsTipBox" style="display:none;" id="showNote"></div>
<script type="text/javascript">
var pathname = window.location.pathname;
var bookId = pathname.substring(pathname.lastIndexOf("/") + 1, pathname.lastIndexOf("."))
//查询章节信息
var lastBookIndexId = $("#lastBookIndexId").val();
if(lastBookIndexId){
$.ajax({
type: "get",
url: "/book/queryBookIndexAbout",
data: {'bookId': bookId, 'lastBookIndexId': lastBookIndexId},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookIndexData = data.data;
$("#bookIndexCount").html("(" + bookIndexData.bookIndexCount + ")");
$("#lastBookContent").html(bookIndexData.lastBookContent + "...");
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}else{
$("#optBtn").remove();
}
</script>
<script language="javascript" type="text/javascript">
//查询是否在书架
$.ajax({
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId': $("#bookId").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if (data.data) {
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
}
} else if (data.code == 1001) {
//未登录
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
var currentBId = 37, spmymoney = 0;
var relationStep = 0;
var authorUId = 8;
$(function () {
$(".icon_show").click(function () {
$(this).hide();
$(".icon_hide").show();
$(".intro_txt").innerHeight("auto");
});
$(".icon_hide").click(function () {
$(this).hide();
$(".icon_show").show();
$(".intro_txt").innerHeight("");
});
$("#AuthorOtherNovel li").unbind("mouseover");
$('#txtComment').on('input propertychange', function () {
var count = $(this).val().length;
$('#emCommentNum').html(count + "/1000");
if (count > 1000) {
$('#txtComment').val($('#txtComment').val().substring(0, 1000));
}
});
});
$.post("/book/addVisitCount", {"bookId": bookId}, function () {
});
function loadCommentList(){
$.ajax({
type: "get",
url: "/book/listCommentByPage",
data: {'bookId': $("#bookId").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var commentList = data.data.list;
if (commentList.length > 0) {
$("#bookCommentTotal").html("("+data.data.total+"条)");
var commentListHtml = "";
for (var i = 0; i < commentList.length; i++) {
var comment = commentList[i];
commentListHtml += ("<div class=\"comment_list cf\">" +
"<div class=\"user_heads fl\" vals=\"389\">" +
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" +
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" +
"<ul class=\"pl_bar fr\">\t\t\t<li class=\"name\">"+(comment.createUserName)+"</li><li class=\"dec\">" +
comment.commentContent+
"</li><li class=\"other cf\">" +
"<span class=\"time fl\">"+comment.createTime+"</span>" +
"<span class=\"fr\"><a href=\"javascript:void(0);\" onclick=\"javascript:BookDetail.AddAgreeTotal(77,this);\" class=\"zan\" style=\"display: none;\">赞<i class=\"num\">(0)</i></a>" +
"</span></li>\t\t</ul>\t</div>");
}
$("#commentPanel").html(commentListHtml);
$("#noCommentPanel").hide();
$("#commentPanel").show();
$("#moreCommentPanel").show();
} else {
$("#commentPanel").hide();
$("#moreCommentPanel").hide();
$("#noCommentPanel").show();
}
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</body>
</html>

View File

@ -0,0 +1,66 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:utext="${book.bookName}+'目录,'+${book.bookName}+'最新章节列表_'+${application.website.name}"></title>
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表'"/>
<meta name="description"
th:content="${application.website.name}+'小说为您提供'+${book.bookName}+'目录,'+${book.bookName}+'最新章节列表,'+${book.bookName}+'全文阅读,'+${book.bookName}+'免费阅读,'+${book.bookName}+'下载'"/>
<link rel="stylesheet" href="/css/main.css"/>
<link rel="stylesheet" href="/css/book.css"/>
</head>
<body>
<div th:replace="common/top :: top('')">
</div>
<div class="main box_center cf">
<div class="nav_sub">
<a href="/" th:text="${application.website.name}"></a>&gt;<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a>&gt;<a
th:href="'/book/'+${book.id}+'.html'" th:utext="${book.bookName}"></a>&gt;<a
th:href="'/book/indexList-'+${book.id}+'.html'">作品目录</a>
</div>
<div class="channelWrap channelChapterlist cf mb50">
<div class="bookMain">
<div class="bookCover cf">
<div class="book_info1">
<div class="tit">
<h1 th:utext="${book.bookName}"></h1><!--<i class="vip_b">VIP</i>-->
</div>
<ul class="list">
<li>
<span>作者:<a href="javascript:void(0)" th:utext="${book.authorName}"></a></span>
<span>类别:<a th:href="'/book/bookclass.html?c='+${book.catId}" th:text="${book.catName}"></a></span>
<span th:switch="${book.bookStatus}">状态:<em class="black3" th:case="'0'">连载中</em><em class="black3"
th:case="*">已完结</em></span>
<span>总点击:<em class="black3" id="cTotal" th:text="${book.visitCount}"></em></span>
<span>总字数:<em class="black3" th:text="${book.wordCount}"></em></span>
</li>
</ul>
</div>
</div>
<div class="dirWrap cf">
<h3 th:text="'正文('+${bookIndexCount}+')'"></h3>
<div class="dirList">
<ul th:each="bookIndex : ${bookIndexList}">
<li><a th:if="${bookIndex.isVip} != '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" >
<span th:utext="${bookIndex.indexName}"></span><i class="red" > [免费]</i>
</a>
<a th:if="${bookIndex.isVip} == '1'" th:href="'/book/'+${book.id}+'/'+${bookIndex.id}+'.html'" th:utext="${bookIndex.indexName}">
</a></li>
</ul>
</div>
</div>
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookdetail.js" type="text/javascript"></script>
</body>
</html>

View File

@ -0,0 +1,150 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'小说排行榜_'+${application.website.name}"></title>
<meta name="keywords" content="小说排行榜,热门小说榜,小说排行榜完结版,完结小说排行榜,完本小说排行榜,最新小说排行榜,网络小说排行榜,排行榜,点击榜,新书榜,推荐榜" />
<meta name="description" th:content="'最新热门网络小说排行榜,包含各类热门小说榜,小说排行榜上都是受用户喜爱的小说作品,精彩尽在'+${application.website.name}+'。'" />
<link rel="stylesheet" href="/css/main.css" />
<link rel="stylesheet" href="/css/book.css" />
</head>
<body>
<div th:replace="common/top :: top('2')">
</div>
<div class="main box_center cf mb50">
<div class="channelRankingContent cf">
<div class="wrap_left fl">
<div class="wrap_bg">
<!--榜单详情 start-->
<div class="pad20">
<div class="book_tit">
<div class="fl">
<h3 class="font26 mt5 mb5" id="rankName">点击榜</h3>
</div>
<a class="fr"></a>
</div>
<div class="updateTable rankTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="rank">排名</th>
<th class="style">类别</th>
<th class="name">书名</th>
<th class="chapter">最新章节</th>
<th class="author">作者</th>
<th class="word">字数</th>
</tr>
</thead>
<tbody id="bookRankList">
</tbody>
</table>
</div>
</div>
<!--榜单详情 end-->
</div>
</div>
<div class="wrap_right fr">
<div class="wrap_inner wrap_right_cont mb20">
<div class="title cf noborder">
<h3 class="on">排行榜</h3>
</div>
<div class="rightList2">
<ul id="rankType">
<li><a class="on" href="javascript:listRank(0)">点击榜</a></li>
<li><a href="javascript:listRank(1)">新书榜</a></li>
<li><a href="javascript:listRank(2)">更新榜</a></li>
<li><a href="javascript:listRank(3)">评论榜</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script type="text/javascript">
$("#rankType a").click(function () {
$("#rankType .on").removeClass("on");
$(this).addClass("on");
})
var rankType = getSearchString("type");
if(rankType==undefined){
rankType=0;
}else{
$("#rankType a").eq(rankType).click();
}
listRank(rankType);
function listRank(rankType){
$.ajax({
type: "get",
url: "/book/listRank",
data: {'type':rankType,'limit':30},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookRankList = data.data;
var bookRankListHtml = "";
for(var i=0;i<bookRankList.length;i++){
var book = bookRankList[i];
var classHtml = "";
if(i<3){
classHtml="num"+(i+1);
}
bookRankListHtml+=("<tr>\n" +
" <td class=\"rank\"><i class=\""+classHtml+"\">"+(i+1)+"</i></td>\n" +
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a></td>\n" +
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >"+book.bookName+"</a></td>\n" +
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >"+book.lastIndexName+"</a>\n" +
" </td>\n" +
" <td class=\"author\"><a href=\"javascript:void(0)\">"+book.authorName+"</a></td>\n" +
" <td class=\"word\">"+(book.wordCount / 10000).toFixed(2)+"万</td>\n" +
" </tr>");
}
$("#bookRankList").html(bookRankListHtml);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
switch (rankType) {
case 0 : {
$("#rankName").html("点击榜");
break;
}
case 1 : {
$("#rankName").html("新书榜");
break;
}
case 2 : {
$("#rankName").html("更新榜");
break;
}
case 3 : {
$("#rankName").html("评论榜");
break;
}
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,364 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'全部作品_'+${application.website.name}"></title>
<meta name="keywords" th:content="${application.website.name}+',小说,小说网,言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,原创网络文学'"/>
<meta name="description"
th:content="${application.website.name}+'每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'。'"/>
<link href="favicon.ico" type="image/x-icon" rel="shortcut icon"/>
<link href="favicon.ico" type="image/x-icon" rel="Bookmark"/>
<link rel="stylesheet" href="/css/main.css"/>
</head>
<body>
<div th:replace="common/top :: top('1')">
</div>
<div class="main box_center cf">
<div class="channelWrap classTable cf">
<div class="so_tag">
<ul class="list">
<li class="so_pd" id="workDirection">
<span class="tit">作品频道:</span>
<a filter-value="0" href="javascript:listBookCategory();search(1,20)" class="on">男频</a>
<a filter-value="1" href="javascript:listBookCategory();search(1,20)">女频</a>
</li>
<li id="idGirl" class="so_class">
<span class="tit">作品分类:</span>
<span class="so_girl" id="girlCategoryList" style="display: none;">
</span>
<span class="so_boy" id="boyCategoryList">
</span>
</li>
<!-- <li class="so_free">
<span class="tit">是否免费:</span>
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=0&so=0&ms=2" class="on">不限</a>
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=1&so=0&ms=2" class="">免费作品</a>
<a href="?b=0&s=0&wb=0&wd=0&up=0&fr=2&so=0&ms=2" class="">收费作品</a>
</li>-->
<li class="so_progress">
<span class="tit">是否完结:</span>
<a href="javascript:search(1,20)" class="on">不限</a>
<a filter-value="0" href="javascript:search(1,20)" class="">连载中</a>
<a filter-value="1" href="javascript:search(1,20)" class="">已完结</a>
</li>
<li class="so_words">
<span class="tit">作品字数:</span>
<a href="javascript:search(1,20)" class="on">不限</a>
<a filter-value-max="300000" href="javascript:search(1,20)" class="">30万字以下</a>
<a filter-value-min="300000" filter-value-max="500000" href="javascript:search(1,20)" class="">30-50万字</a>
<a filter-value-min="500000" filter-value-max="1000000" href="javascript:search(1,20)" class="">50-100万字</a>
<a filter-value-min="1000000" href="javascript:search(1,20)" class="">100万字以上</a>
</li>
<li class="so_update">
<span class="tit">更新时间:</span>
<a href="javascript:search(1,20)" class="on">不限</a>
<a filter-value="3" href="javascript:search(1,20)" class="">三日内</a>
<a filter-value="7" href="javascript:search(1,20)" class="">七日内</a>
<a filter-value="15" href="javascript:search(1,20)" class="">半月内</a>
<a filter-value="30" href="javascript:search(1,20)" class="">一月内</a>
</li>
<li class="so_sort">
<span class="tit">排序方式:</span>
<a href="javascript:search(1,20)" class="on">不限</a>
<a filter-value="last_index_update_time" href="javascript:search(1,20)" class="">更新时间</a>
<a filter-value="word_count" href="javascript:search(1,20)" class="">总字数</a>
<a filter-value="visit_count" href="javascript:search(1,20)" class="">点击量</a>
</li>
</ul>
</div>
</div>
<div class="channelWrap channelClassContent cf">
<div class="updateTable rankTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="rank">序号</th>
<th class="style">类别</th>
<th class="name">书名</th>
<th class="chapter">最新章节</th>
<th class="author">作者</th>
<th class="word">字数</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="books">
</div>
</div>
</div>
</div>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/bookclass.js" type="text/javascript"></script>
<script type="text/javascript">
var workDirection;
var catId = getSearchString('c');
listBookCategory(catId);
if(!catId){
search(1, 20);
}
function search(curr, limit) {
var searchData = {};
searchData.curr = curr;
searchData.limit = limit;
searchData.keyword = $("#searchKey").val();
var workDirection = $(".so_pd>.on").attr("filter-value");
if(workDirection != undefined){
searchData.workDirection = workDirection;
}
if(workDirection == 1){
var catId = $(".so_girl>.on").attr("filter-value");
}else{
var catId = $(".so_boy>.on").attr("filter-value");
}
if(catId != undefined){
searchData.catId = catId;
}
var bookStatus = $(".so_progress>.on").attr("filter-value");
if(bookStatus != undefined){
searchData.bookStatus = bookStatus;
}
var wordCountMin = $(".so_words>.on").attr("filter-value-min");
if(wordCountMin != undefined){
searchData.wordCountMin = wordCountMin;
}
var wordCountMax = $(".so_words>.on").attr("filter-value-max");
if(wordCountMax != undefined){
searchData.wordCountMax = wordCountMax;
}
var updatePeriod = $(".so_update>.on").attr("filter-value");
if(updatePeriod != undefined){
searchData.updatePeriod = updatePeriod;
}
var sort = $(".so_sort>.on").attr("filter-value");
if(sort != undefined){
searchData.sort = sort;
}
$.ajax({
type: "get",
url: "/book/searchByPage",
data: searchData,
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
var wordCount = (book.wordCount / 10000).toFixed(2);
bookListHtml += (" <tr>\n" +
" <td class=\"rank\"><i>" + (i + 1) + "</i></td>\n" +
" <td class=\"style\"><a href=\"/book/bookclass.html?c="+book.catId+"\" cls=\"13\">[" + book.catName + "]</a></td>\n" +
" <td class=\"name\"><a href=\"/book/"+book.id+".html\" >" + book.bookName + "</a></td>\n" +
" <td class=\"chapter\"><a href=\"/book/"+book.id+".html\" >" + book.lastIndexName + "</a>\n" +
" </td>\n" +
" <td class=\"author\"><a href=\"javascript:void(0)\">" + book.authorName + "</a></td>\n" +
" <td class=\"word\">" + wordCount + "万</td>\n" +
" </tr>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function listBookCategory(c) {
$.ajax({
type: "get",
url: "/book/listBookCategory",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var categoryList = data.data;
var boyCategoryListHtml = "";
boyCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
var girlCategoryListHtml = "";
girlCategoryListHtml += " <a href=\"javascript:search(1,20)\" class=\"on\">不限</a>";
for (var i = 0; i < categoryList.length; i++) {
var category = categoryList[i];
if (category.workDirection == 1) {
if(category.id==c){
workDirection = 1;
}
girlCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
} else {
if(category.id==c){
workDirection = 0;
}
boyCategoryListHtml += (" <a filter-value='"+category.id+"' href=\"javascript:search(1,20)\">" + category.name + "</a>");
}
}
$("#boyCategoryList").html(boyCategoryListHtml);
$("#girlCategoryList").html(girlCategoryListHtml);
$(".so_girl a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_girl>.on").removeClass("on");
$(".so_girl a").eq(index).addClass("on");
})
$(".so_boy a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_boy>.on").removeClass("on");
$(".so_boy>.on").removeClass("on");
$(".so_boy a").eq(index).addClass("on");
})
if(c) {
if (workDirection === 1) {
$(".so_pd a").eq(1).click();
$("#girlCategoryList a[filter-value=" + c + "]").click();
} else {
$("#boyCategoryList a[filter-value=" + c + "]").click();
}
search(1, 20);
}
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
<script language="javascript" type="text/javascript">
$(function () {
$(".so_pd a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_pd>.on").removeClass("on");
if (index == 2) {
$(".so_pd a").eq(1).addClass("on");
$(".so_girl").show();
$(".so_boy").hide();
} else {
$(".so_pd a").eq(0).addClass("on");
$(".so_girl").hide();
$(".so_boy").show();
}
})
$(".so_progress a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_progress>.on").removeClass("on");
$(".so_progress>.on").removeClass("on");
$(".so_progress a").eq(index-1).addClass("on");
})
$(".so_words a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_words>.on").removeClass("on");
$(".so_words>.on").removeClass("on");
$(".so_words a").eq(index-1).addClass("on");
})
$(".so_update a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_update>.on").removeClass("on");
$(".so_update>.on").removeClass("on");
$(".so_update a").eq(index-1).addClass("on");
})
$(".so_sort a").click(function () {
var index = $(this).index();
console.log(index);
$(".so_sort>.on").removeClass("on");
$(".so_sort>.on").removeClass("on");
$(".so_sort a").eq(index-1).addClass("on");
})
$(".style a").each(function () {
var bId = $(this).attr("cls");
if (bId > 0) {
$(this).html("[" + getBName(bId) + "]");
}
});
if (2 == 1) {
$(".so_pd>.on").removeClass("on");
$(".so_pd a").eq(1).addClass("on");
$(".so_girl").hide();
$(".so_boy").show();
}
});
function getBName(bId) {
for (var i = 0; i < bClass.rows.length; i++) {
if (bId == bClass.rows[i].BId) {
return bClass.rows[i].Name;
}
}
return "";
}
</script>
</body>
</html>

View File

@ -0,0 +1,14 @@
<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="/user/feedback.html">反馈留言</a><i class="line">|</i><a
href="/author/index.html">作家专区</a><i class="line">|</i><a
href="/mobile/fiction_house.apk">客户端</a></li>
<li th:text="'Copyright (C) '+${application.website.domain}+' All rights reserved&nbsp;&nbsp;'+${application.website.name}+'版权所有'"></li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:fragment="common_head(title,meta,links,script)">
<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}"/>
<th:block th:replace="${script}"/>
<script>
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?ecc8b50a3122e6d5e09be7a9e5383e07";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
</head>
<body>
</body>
</html>

View 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>

View File

@ -0,0 +1,52 @@
<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="${application.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 th:src="${application.website.logo}"
th:alt="${application.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="/pay/index.html">充值</a></li>
<li><a href="/author/index.html" target="_blank">作家专区</a></li>
</ul>
</div>
</div>
</div>

View File

@ -0,0 +1,419 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="${application.website.name}+'_原创小说网站'"></title>
<meta name="keywords" th:content="${application.website.keyword}"/>
<meta name="description"
th:content="${application.website.description}"/>
<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" th:if="${bookMap['0']}" >
<dd th:each="book,iterStat : ${bookMap['0']}" th:class="${iterStat.first}? 'on'"><a th:href="'/book/'+${book.bookId}+'.html'">
<img th:src="${book.picUrl}" th:alt="${book.bookName}"/></a></dd>
</dl>
<div class="scSmallImg" id="carouseSmall" >
<ul th:if="${bookMap['0']}">
<li th:each="book,iterStat : ${bookMap['0']}" th:class="${iterStat.first}? 'on'">
<img th:src="${book.picUrl}" th:alt="${book.bookName}"/></li>
</ul>
</div>
</div>
<div class="hot_articles">
<dl class="hot_recommend" id="topBooks1" th:if="${bookMap['1']} and ${#lists.size(bookMap['1']) > 0}">
<dt><a th:href="'/book/'+${bookMap['1'][0].bookId}+'.html'" th:text="${bookMap['1'][0].bookName}"></a></dt>
<dd th:if="${#lists.size(bookMap['1']) > 1}"><a th:href="'/book/'+${bookMap['1'][1].bookId}+'.html'" th:text="${bookMap['1'][1].bookName}"></a><a th:if="${#lists.size(bookMap['1']) > 2}" th:href="'/book/'+${bookMap['1'][2].bookId}+'.html'" th:text="${bookMap['1'][2].bookName}"></a></dd>
<dd th:if="${#lists.size(bookMap['1']) > 3}"><a th:href="'/book/'+${bookMap['1'][3].bookId}+'.html'" th:text="${bookMap['1'][3].bookName}"></a><a th:if="${#lists.size(bookMap['1']) > 4}" th:href="'/book/'+${bookMap['1'][4].bookId}+'.html'" th:text="${bookMap['1'][4].bookName}"></a></dd>
</dl>
<dl class="hot_recommend" id="topBooks2" th:if="${bookMap['1']} and ${#lists.size(bookMap['1']) > 5}">
<dt><a th:href="'/book/'+${bookMap['1'][5].bookId}+'.html'" th:text="${bookMap['1'][5].bookName}"></a></dt>
<dd th:if="${#lists.size(bookMap['1']) > 6}"><a th:href="'/book/'+${bookMap['1'][6].bookId}+'.html'" th:text="${bookMap['1'][6].bookName}"></a><a th:if="${#lists.size(bookMap['1']) > 7}" th:href="'/book/'+${bookMap['1'][7].bookId}+'.html'" th:text="${bookMap['1'][7].bookName}"></a></dd>
<dd th:if="${#lists.size(bookMap['1']) > 8}"><a th:href="'/book/'+${bookMap['1'][8].bookId}+'.html'" th:text="${bookMap['1'][8].bookName}"></a><a th:if="${#lists.size(bookMap['1']) > 9}" th:href="'/book/'+${bookMap['1'][9].bookId}+'.html'" th:text="${bookMap['1'][9].bookName}"></a></dd>
</dl>
<dl class="hot_notice" id="indexNews">
<dd style="text-align:left;" th:each="news : ${newsList}"><span th:text="'['+${news.catName}+']'"></span><a th:href="'/about/newsInfo-'+${news.id}+'.html'" th:utext="${news.title}"></a>
</dd>
</dl>
</div>
</div>
<div class="rightBox">
<div class="title cf" id="weekcommend">
<h3>本周强推</h3>
</div>
<div class="rightList">
<ul id="currentWeek" th:if="${bookMap['2']}">
<li th:each="book,iterStat : ${bookMap['2']}" th:class="${iterStat.first}? 'on num1': (${iterStat.index < 3}? 'num'+${iterStat.index+1})">
<div class="book_name"><i th:text="${iterStat.index+1}"></i><a class="name" th:href="'/book/'+${book.bookId}+'.html'" th:text="${book.bookName}"></a></div>
<div class="book_intro">
<div class="cover"><a th:href="'/book/'+${book.bookId}+'.html'"><img th:src="${book.picUrl}" th:alt="${book.bookName}"></a>
</div>
<a class="txt" th:href="'/book/'+${book.bookId}+'.html'" th:utext="${book.bookDesc}"></a>
</div>
</li>
</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" th:if="${bookMap['3']}">
<div class="itemsList" th:each="book : ${bookMap['3']}">
<a class="items_img" th:href="'/book/'+${book.bookId}+'.html'">
<img class="lazyload" src="/images/default.gif" th:data-src="${book.picUrl}" th:alt="${book.bookName}">
</a>
<div class="items_txt">
<h4><a th:href="'/book/'+${book.bookId}+'.html'" th:text="${book.bookName}"></a></h4>
<p class="author"><a href="javascript:void(0)" th:text="'作者'+${book.authorName}"></a></p>
<p class="intro"><a th:href="'/book/'+${book.bookId}+'.html'" th:utext="${book.bookDesc}"></a>
</p>
</div>
</div>
</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">查看更多&gt;</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" th:if="${bookMap['4']}">
<div class="itemsList" th:each="book : ${bookMap['4']}">
<a class="items_img" th:href="'/book/'+${book.bookId}+'.html'">
<img class="lazyload" src="/images/default.gif" th:data-src="${book.picUrl}" th:alt="${book.bookName}">
</a>
<div class="items_txt">
<h4><a th:href="'/book/'+${book.bookId}+'.html'" th:text="${book.bookName}"></a></h4>
<p class="author"><a href="javascript:void(0)" th:text="'作者'+${book.authorName}"></a></p>
<p class="intro"><a th:href="'/book/'+${book.bookId}+'.html'" th:utext="${book.bookDesc}"></a>
</p>
</div>
</div>
</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">查看更多&gt;</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">查看更多&gt;</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/lazyload.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
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 () {
$(this).off('mouseenter').on('mouseenter', function () {
clearTimeout(open);
});
});
lazyload();
$(function () {
//点击榜单数据查询
$.ajax({
type: "get",
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 clickRankBook = clickRankBooks[i];
var classHtml = "";
var imageHtml = "";
if (i == 0) {
classHtml = "on";
imageHtml = "<img src=\"" + clickRankBook.picUrl + "\" alt=\"" + clickRankBook.bookName + "\"/>";
}
if (i < 3) {
classHtml += (" num" + (i + 1));
}
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\">"+ imageHtml +"</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: "get",
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 newRankBook = newRankBooks[i];
var classHtml = "";
var imageHtml = "";
if (i == 0) {
classHtml = "on";
imageHtml = "<img src=\"" + newRankBook.picUrl + "\" alt=\"" + newRankBook.bookName + "\"/>";
}
if (i < 3) {
classHtml += (" num" + (i + 1));
}
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\">" + imageHtml + "</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: "get",
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 updateRankBook = updateRankBooks[i];
var classHtml = "";
var imageHtml = "";
if (i == 0) {
classHtml = "on";
imageHtml = "<img\ src=\"" + updateRankBook.picUrl + "\" alt=\"" + updateRankBook.bookName + "\"/>";
}
if (i < 3) {
classHtml += (" num" + (i + 1));
}
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\">" + imageHtml + "</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: "get",
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>

View File

@ -0,0 +1,384 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta th:if="${catId == 9}" name="viewport" content="width=device-width, initial-scale=0.5, maximum-scale=1">
<meta th:if="${catId != 9}" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:utext="${book.bookName}+${bookIndex.indexName}"></title>
<meta name="keywords" th:content="${book.bookName}+','+${bookIndex.indexName}">
<meta name="description"
th:content="${book.bookName}+'最新更新章节免费在线阅读TXT下载'">
<div th:include="mobile/common/css :: css"></div>
<script type="text/javascript">
function reinitIframe(){
var iframe = document.getElementById("frame_content");
try{
iframe.height =  iframe.contentWindow.document.documentElement.scrollHeight;
}catch (ex){}
}
window.setInterval("reinitIframe()", 200);
</script>
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
.Readpage {
font-size: 14px;
padding: 0;
background: #d4eaf2;
height: 40px;
line-height: 40px;
text-align: center;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
* {
margin: 0;
padding: 0;
/* background-attachment: fixed; */
}
user agent stylesheet
p {
display: block;
-webkit-margin-before: 1em;
-webkit-margin-after: 1em;
-webkit-margin-start: 0px;
-webkit-margin-end: 0px;
}
.huyanon {
border: 1px solid #64c878;
box-shadow: 0 1px 2px #b9ecc4 inset, 0 -1px 0 #6c9f76 inset, 0 -2px 3px #b9ecc4 inset;
background: -webkit-linear-gradient(top, #90dfa2, #84d494);
background: -moz-linear-gradient(top, #90dfa2, #84d494);
background: linear-gradient(top, #90dfa2, #84d494);
}
.Readpage a {
font-size: 16px;
padding: 2px 2px;
line-height: 35px;
}
.lightoff, .huyanoff, .sizebgon {
border: 1px solid #333;
box-shadow: 0 1px 2px #8b8b8b inset, 0 -1px 0 #3d3d3d inset, 0 -2px 3px #8b8b8b inset;
background: -webkit-linear-gradient(top, #656565, #4c4c4c);
background: -moz-linear-gradient(top, #656565, #4a4a4a);
background: linear-gradient(top, #656565, #4a4a4a);
}
.button {
width: 40px;
line-height: 38px;
text-align: center;
font-weight: bold;
color: #fff;
text-shadow: 1px 1px 1px #333;
border-radius: 5px;
margin: 3px 0px 0px 0;
position: relative;
overflow: hidden;
}
a {
color: #4c6978;
text-decoration: none;
border: none;
cursor: pointer;
}
.lighton {
border: 1px solid #d2a000;
box-shadow: 0 1px 2px #fedd71 inset, 0 -1px 0 #a38b39 inset, 0 -2px 3px #fedd71 inset;
background: -webkit-linear-gradient(top, #fece34, #d8a605);
background: -moz-linear-gradient(top, #fece34, #d8a605);
background: linear-gradient(top, #fece34, #d8a605);
}
.screen_toolbar {
position: fixed;
width: 100%;
left: 0px;
bottom: 100px;
text-align: center;
}
</style>
</head>
<body id="read">
<div id="content">
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
<input type="hidden" id="bookNameHidden" th:value="${book.bookName}"/>
<input type="hidden" id="contentIdHidden" th:value="${bookIndex.id}"/>
<input type="hidden" id="indexNameHidden" th:value="${bookIndex.indexName}"/>
<input type="hidden" id="indexNumHidden" th:value="${bookIndex.indexNum}"/>
<script>
var token = localStorage.getItem("token");
</script>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b style="padding-left: 5%;float: left;width: 69%" class="line-limit-length" th:utext="${bookIndex.indexName}+' '+${book.bookName}"></b></a>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<p class="Readpage" style="background:#FFFFFF;padding:2px;">
<a id="lightdiv" class="button lightoff" onclick="nr_setbg('light')">关灯</a>
<a id="huyandiv" class="button huyanon" onclick="nr_setbg('huyan')">护眼</a>&nbsp;&nbsp;&nbsp;&nbsp;
字体:<a id="fontbig" class="sizebg" onclick="nr_setbg('big')">大</a> <a id="fontmiddle" class="button sizebgon"
onclick="nr_setbg('middle')">中</a> <a
id="fontsmall" class="sizebg" onclick="nr_setbg('small')">小</a>
</p>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
</div>
<!--<div id="screenInput" class="screen_toolbar" style="display: none">
<div style="height: 5px" class="layui-col-xs2 layui-col-sm3 layui-col-md3 layui-col-lg3"></div>
<div class="layui-col-xs6 layui-col-sm4 layui-col-md4 layui-col-lg4">
<input type="text" id="screenBulletText" required lay-verify="required" placeholder="请输入弹幕内容,右下角开关可控制弹幕是否开启" autocomplete="off"
class="layui-input">
</div>
<div class="layui-col-xs2 layui-col-sm1 layui-col-md1 layui-col-lg1">
<button class="layui-btn send">发送</button>
</div>
</div>
<form id="screenSwitch" class="layui-form">
<div class="layui-form-item" style="position: fixed;right: 0px;bottom: 100px" title="弹幕开关">
&lt;!&ndash; <label class="layui-form-label" style="opacity:0.5;font-weight: bold;color: red;">弹幕</label>&ndash;&gt;
<div class="layui-input-block">
<input class="clear" type="checkbox" name="switch" lay-skin="switch">
</div>
</div>
</form>-->
<div th:replace="mobile/common/js :: js">
</div>
<div id="chaptercontent" class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 20px;" th:if="${!needBuy}">
<p style="width:100%;text-alight:center; overflow: auto;-webkit-overflow-scrolling:touch;" >&nbsp;&nbsp;&nbsp;&nbsp;
<span
th:utext="${bookContent.content}"></span></p>
</div>
<div class="Readarea ReadAjax_content screen_container"
style="color: rgb(0, 0, 0); font-size: 20px;background-color: #fff" th:if="${needBuy}">
<h5>此章为VIP章节需要订阅后才能继续阅读</h5>
价格:<span style="color: red" th:text="${bookIndex.bookPrice}+'屋币(1元=100屋币)'"></span><br/>
<a href="javascript:buyBookIndex()" type="button" class="layui-btn layui-btn-sm layui-btn-radius">购买</a>
</div>
<div class="indexDiv" style="height: 42px;line-height: 42px;text-align:center;background: #f2f2f2">
<a style="color: #333" th:href="'javascript:enterPreIndexPage(\''+${book.id}+'\',\''+${preBookIndexId}+'\');'">上一章</a>
<a style="color: #333" th:href="'/book/indexList-'+${book.id}+'.html'">目录</a>
<a style="color: #333" th:href="'javascript:enterNextIndexPage(\''+${book.id}+'\',\''+${nextBookIndexId}+'\');'">下一章</a>
</div>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<script>
var ua = navigator.userAgent;
var ipad = ua.match(/(iPad).*OS\s([\d_]+)/),
isIphone =!ipad && ua.match(/(iPhone\sOS)\s([\d_]+)/),
isAndroid = ua.match(/(Android)\s+([\d.]+)/),
isMobile = isIphone || isAndroid;
</script>
<script>
(function () {
//添加阅读记录
$.ajax({
type: "POST",
url: "/user/addReadHistory",
data: {'bookId': $("#bookIdHidden").val(), 'preContentId': $("#contentIdHidden").val()},
dataType: "json",
success: function (data) {
},
error: function () {
}
})
$("#content").css("min-height",($(window).height()-60)+"px");
})();
</script>
<script src="/mobile/js/read.js"></script>
<script language="javascript">getset()</script>
<script language="javascript">getset1()</script>
<script language="javascript">
var books = localStorage.getItem("historyBooks");
var item = parseInt($("#bookIdHidden").val());
if (books) {
var booksArr = JSON.parse(books);
if (booksArr.length >= 50) {
booksArr.splice(0, 1);
}
booksArr.remove(item);
booksArr[booksArr.length] = item;
} else {
var booksArr = [item];
}
localStorage.setItem("historyBooks", JSON.stringify(booksArr));//
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
function buyBookIndex(){
$.ajax({
type: "POST",
url: "/user/buyBookIndex",
data: {'bookId':$("#bookIdHidden").val(),"bookName":$("#bookNameHidden").val(),
"bookIndexId":$("#contentIdHidden").val(),"bookIndexName":$("#indexNameHidden").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if(data.code == 1001){
//未登录
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
$.post("/book/addVisitCount", {"bookId": $("#bookIdHidden").val()}, function () {
});
function enterPreIndexPage(bookId,bookIndexId){
if(bookIndexId != 0){
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
}else{
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
function enterNextIndexPage(bookId,bookIndexId){
if(bookIndexId != 0){
window.location.href = '/book/'+bookId+'/'+bookIndexId+".html";
}else{
window.location.href = '/book/indexList-' + bookId + '.html';
}
}
</script>
</html>

View File

@ -0,0 +1,363 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:utext="${book.bookName}+'小说最新章节免费阅读和下载'"></title>
<meta name="keywords"
th:content="${book.bookName}+','+${book.bookName}+'最新章节,'+${book.bookName}+'免费阅读,'+${book.bookName}+'TXT下载'">
<meta name="description"
th:content="${book.bookName}+'最新章节列表,'+${book.bookName}+'最新更新章节免费无广告无弹窗在线阅读,'+${book.bookName}+'小说TXT免费下载。'">
<div th:include="mobile/common/css :: css"></div>
<style type="text/css">
.indexP p a {
color: #4c6978;
}
.tag-list {
padding-top: 0px;
padding-bottom: 20px;
position: fixed;
top: 50px;
right: 0px;
width: 120px;
z-index: 100000;
}
.tag-list .tag {
float: right;
width: 100%;
text-align: right;
margin-top: 5px;
}
.tag-list .tag a {
display: inline-block;
margin-right: 8px;
font-size: 12px;
}
.tag-list .highlight {
padding: 5px 9px;
border: 1px solid #f90;
color: #f90;
border-radius: 50px;
}
.tag-list .highlight .text {
color: #f90;
}
.tag-list .tag .text {
display: inline-block;
vertical-align: middle;
color: #f90;
}
ul, li {
padding: 0;
margin: 0;
list-style: none;
}
.tag-list .tag a {
display: inline-block;
margin-right: 8px;
font-size: 12px;
}
.tag-list .highlight .icn {
color: #f90;
}
.tag-list .tag .icn {
margin-right: 5px;
color: #ccc;
}
.tag-list .highlight .text {
padding-left: 3px;
color: #f90;
}
.tag-list .tag .text {
display: inline-block;
vertical-align: middle;
color: #f90;
}
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
</head>
<body>
<div id="content">
<ul class="tag-list clearfix" id="tagLi">
</ul>
<input type="hidden" id="bookIdHidden" th:value="${bookId}"/>
<input type="hidden" id="bookNamedHidden" th:value="${book.bookName}"/>
<input type="hidden" id="preContentId" th:value="${firstBookIndexId}"/>
<div style="height: 50px;line-height: 50px;text-align: center"
class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon" th:utext="${book.bookName}"></b>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<div class="layui-row" style="background: #f2f2f2">
<div style="padding: 3px" class="layui-col-xs4 layui-col-sm2 layui-col-md2 layui-col-lg2">
<img style=" width:130px; height:auto; max-width:100%; max-height:100%;" th:src="${book.picUrl}"/>
</div>
<div style="position:relative;padding: 3px 10px 0px"
class="layui-col-xs8 layui-col-sm8 layui-col-md8 layui-col-lg8">
<a th:href="'javascript:searchBooks(\''+ ${book.authorName}+'\')'">
<div style=";color: #444;" th:utext="'作者'+ ${book.authorName}"></div>
</a>
<a th:href="'/book/book_ranking.html?catId='+${book.catId}">
<div style="margin-top: 5px;color: #444;" th:text="'类别'+ ${book.catName}"></div>
</a>
<div style="margin-top: 5px;color: #444;" th:text="'状态'+ ${book.bookStatus==0?'连载':'完结'}"></div>
<div style="margin-top: 5px;color: #444;">更新:<i
th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd')}"></i></div>
<div style="margin-top: 5px;color: #444;">评分:<i style="font-weight:bold;color: red"
th:text="${book.score} + '分'"></i></div>
<div style="margin-top: 5px;color: #444;">点击:<i style="font-weight:bold;color: red"
th:text="${book.visitCount}"></i></div>
</div>
</div>
<div style="text-align: center;height: 45px;line-height: 45px">
<a th:href="'/book/'+${book.id}+'/'+${firstBookIndexId}+'.html'" type="button"
style="background-color:#3eaf7c!important" class="layui-btn layui-btn-sm layui-btn-radius">开始阅读</a>
<button type="button" id="cFavs" onclick="addInShell()"
style="border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important"
class="layui-btn layui-btn-sm layui-btn-radius ">加入书架
</button>
<!--
<button type="button" onclick="downloadFile()" class="layui-btn layui-btn-sm layui-btn-radius layui-bg-normal">下载TXT</button>
-->
</div>
<p style="line-height: 23px;padding: 10px;font-size: 14px;color: #333;" th:utext="${book.bookDesc}">
</p>
<div class="layui-collapse">
<div class="layui-colla-item">
<h2 class="layui-colla-title">
<span>最新章节</span>
<span style="margin-left: 30px">
更新: <i th:text="${#dates.format(book.lastIndexUpdateTime, 'yy-MM-dd HH:mm:ss')}"></i>
</span>
</h2>
<div class="layui-colla-content layui-show indexP layui-row" id="indexList">
</div>
</div>
</div>
<div style="height: 42px;color:#4c6978;line-height: 42px;padding-left: 30px;background: #f2f2f2">
<a th:href="'/book/indexList-'+${book.id}+'.html'">查看完整目录</a>
</div>
<!--
<div style="position: fixed;top:0px;left:0px;z-index:-100;opacity: 0" th:utext="${attacDivForSearch}"></div>
-->
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
</body>
<div th:replace="mobile/common/js :: js">
</div>
<script>
//查询是否在书架
$.ajax({
type: "get",
url: "/user/queryIsInShelf",
data: {'bookId': $("#bookIdHidden").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if (data.data) {
$("#cFavs").replaceWith("<button type=\"button\" id=\"cFavs\" style=\"border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important\" class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">已在书架</button>");
}
} else if (data.code == 1001) {
//未登录
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
//查询最新目录集合
$.ajax({
type: "get",
url: "/book/queryNewIndexList",
data: {'bookId': $("#bookIdHidden").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var indexListHtml = "";
for (var i = 0; i < data.data.length; i++) {
var bookIndex = data.data[i];
indexListHtml += ("<p class=\"line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2\" style=\"padding-left:10px;height: 50px;line-height: 50px;\"><a href=\"/book/" + $("#bookIdHidden").val() + "/" + bookIndex.id + ".html\" style='color: #333'>" + bookIndex.indexName + "</a></p>");
}
$("#indexList").html(indexListHtml);
} else if (data.code == 1001) {
//未登录
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
function addInShell() {
$.ajax({
type: "POST",
url: "/user/addToBookShelf",
data: {'bookId': $("#bookIdHidden").val(), 'preContentId': $("#preContentId").val()},
dataType: "json",
success: function (data) {
if (data.code == 200) {
$("#cFavs").replaceWith("<button type=\"button\" id=\"cFavs\" style=\"border: 1px solid #3eaf7c;color: #3eaf7c;background-color:#fff!important\" class=\"layui-btn layui-btn-sm layui-btn-radius layui-btn-warm\">已在书架</button>");
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
$("#content").css("min-height", ($(window).height() - 60) + "px");
function downloadFile() {
var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val();
window.location.href = fileUrl;
}
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
function addToCollect() {
var token = localStorage.getItem("token");
if (token) {
$.get("/user/addToCollect", {"bookId": $("#bookIdHidden").val(), "token": token}, function (data) {
layer.alert(data.desc);
if (data.code == 1) {
$('#collectButton').unbind("click");
$("#collectButton").text("撤下书架");
$("#collectButton").click(function () {
cancelToCollect();
});
}
});
} else {
window.location.href = "/user/login.html?bookId=" + $("#bookIdHidden").val();
}
}
function cancelToCollect() {
var token = localStorage.getItem("token");
if (token) {
$.get("/user/cancelToCollect", {"bookId": $("#bookIdHidden").val(), "token": token}, function (data) {
layer.alert(data.desc);
if (data.code == 1) {
$('#collectButton').unbind("click");
$("#collectButton").text("加入书架");
$("#collectButton").click(function () {
addToCollect();
});
}
});
} else {
window.location.href = "/user/login.html?bookId=" + $("#bookIdHidden").val();
}
}
function searchBooks(keyword) {
window.location.href = "/book/book_ranking.html?keyword=" + encodeURI(keyword);
}
$.post("/book/addVisitCount", {"bookId": $("#bookIdHidden").val()}, function () {
});
</script>
</html>

View File

@ -0,0 +1,96 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:utext="${book.bookName}+'最新免费章节目录列表'"></title>
<meta name="keywords" th:content="${book.bookName}+','+${book.bookName}+'最新章节'">
<meta name="description"
th:content="${book.bookName}+'最新章节列表,'+${book.bookName}+'最新更新章节免费无广告无弹窗在线阅读TXT下载。'">
</div>
<div th:include="mobile/common/css :: css"></div>
<style type="text/css">
.indexP p a {
color: #4c6978;
}
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
</div>
</head>
<body>
<div id="content">
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<a style="color: #ffffff;" th:href="'/book/'+ ${book.id} + '.html'"><b class="layui-icon" th:utext="${book.bookName}"></b></a>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<p style="height: 30px;line-height: 30px;padding: 10px">
<a href="#buttom" style="color: red">&nbsp;&nbsp;↓直达页面底部</a>
</p>
<div class="layui-colla-content layui-show indexP layui-row">
<p class="line-limit-length layui-col-xs12 layui-col-sm4 layui-col-md3 layui-col-lg2" style="padding-left:10px;height: 50px;line-height: 50px;" th:each="index : ${bookIndexList}">
<a style="color:#333;" th:href="'/book/'+${index.bookId}+'/'+${index.id}+'.html'" th:utext="${index.indexName}">
</a>
</p>
</div>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="mobile/common/js :: js">
</div>
<script>
$("#content").css("min-height",($(window).height()-60)+"px");
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){});
function toMyCollect(){
var token = localStorage.getItem("token");
if(token) {
window.location.href = "/book/search?token=" + token;
}else{
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,320 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title>
<meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<meta name="description"
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<div th:include="mobile/common/css :: css"></div>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 130px;
height: 180px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="token" th:value="${token}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="catId" th:value="${catId}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">小说列表</b>
<div style="float: right;margin-right: 10px">
<a href="/"><i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i></a>
</div>
</div>
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
autocomplete="off"
class="layui-input" th:value="${keyword}">
</div>
<div class="layui-col-xs1" style="padding: 1%">
<button onclick="search(1,20)" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
</div>
</div>
</div>
<div id="bookList">
</div>
<div id="books" style="text-align: center"></div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="mobile/common/js :: js"></div>
<script>
var catId = getQueryVariable("catId");
var bookStatus = getQueryVariable("bookStatus");
var sortBy = getQueryVariable("sortBy");
var keyword = getQueryVariable("keyword");
if(keyword != false){
$("#title").val(decodeURI(keyword));
}else{
keyword = "";
}
search(1,20);
function search(curr,limit) {
var searchData = {};
searchData.curr = curr;
searchData.limit = limit;
keyword = $("#title").val();
if(catId != false){
searchData.catId = catId;
}
if(bookStatus != false){
searchData.bookStatus = bookStatus;
}
if(sortBy != false){
searchData.sort = sortBy;
}else if(!keyword){
sortBy = "last_index_update_time";
}
if(keyword){
searchData.keyword = keyword;
}
$.ajax({
type: "get",
url: "/book/searchByPage",
data: searchData,
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
/*var end = book.bookDesc.indexOf("<");
if(end != -1) {
book.bookDesc = book.bookDesc.substring(0,end);
}*/
if(book.bookDesc){
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"").replace(/&nbsp;/g,"");
}
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
" <a href=\"/book/"+book.id+".html\">\n" +
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
" src=\""+book.picUrl+"\"/>\n" +
"\n" +
" </div>\n" +
" </a>\n" +
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
" <a href=\"/book/"+book.id+".html\">\n" +
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">"+book.bookName+"</div>\n" +
" </a>\n" +
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
" <a href=\"/book/book_ranking.html?keyword="+encodeURI(book.authorName)+"\">\n" +
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
" </a>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:"+book.catName+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
" </div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:"+(book.bookDesc?(book.bookDesc.length>15?(book.bookDesc.substr(0,15)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
"\n" +
"\n" +
" </div>\n" +
"\n" +
" </div>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function searchByAllCondition(curr, limit, newKeyword) {
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
var ids = $("#ids").val();
if (ids) {
toUrl += ("&historyBookIds=" + ids);
}
var token = $("#token").val();
if (token) {
toUrl += ("&token=" + token);
}
var keyword = $("#keyword").val();
if (newKeyword) {
toUrl += encodeURI("&keyword=" + newKeyword);
} else if (keyword) {
toUrl += encodeURI("&keyword=" + keyword);
}
var bookStatus = $("#bookStatus").val();
if (bookStatus) {
toUrl += ("&bookStatus=" + bookStatus);
}
var catId = $("#catId").val();
if (catId) {
toUrl += ("&catId=" + catId);
}
var sortBy = $("#sortBy").val();
if (sortBy) {
toUrl += ("&sortBy=" + sortBy);
}
var sort = $("#sort").val();
if (sort) {
toUrl += ("&sort=" + sort);
}
window.location.href = toUrl;
}
function searchBooks() {
var keywords = $("#title").val();
$("#keyword").val("");
searchByAllCondition(1, 20, keywords);
}
</script>
<script>
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,88 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>小说提交</title>
<div th:include="common/css :: css"></div>
</head>
<body id="read" >
</div>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #92B8B1;" class="layui-icon">&#xe65c;</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">&#xe68e;</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>

View File

@ -0,0 +1,270 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.seoConfig.page['mh-search.title']}"></title>
<meta name="keywords" th:content="${application.seoConfig.page['mh-search.keyword']}">
<meta name="description"
th:content="${application.seoConfig.page['mh-search.description']}">
<div th:include="common/css :: css"></div>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 147px;
height: 197px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="softTag" th:value="${softTag}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="softCat" th:value="${softCat}"/>
<ul class="layui-nav" lay-filter="" style="padding:0 20px;text-align: center" >
<li id="menunew" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9">最新</a></li>
<li id="menu21" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9&softCat=3262">少年漫</a></li>
<li id="menu22" class="layui-nav-item"><a href="/book/searchSoftBook.html?catId=9&softCat=3263">少女漫</a></li>
<li id="menucomplete" class="layui-nav-item"><a >完本</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成">全部</a></dd>
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3262">少年漫</a></dd>
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3263">少女漫</a></dd>
</dl>
</li>
<li id="menuhot" class="layui-nav-item"><a >排行</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/searchSoftBook.html?catId=9&sortBy=score">全部</a></dd>
<dd><a href="/book/searchSoftBook.html?catId=9&sortBy=score&softCat=3262">少年漫</a></dd>
<dd><a href="/book/searchSoftBook.html?catId=9&bookStatus=已完成&softCat=3263">少女漫</a></dd>
</dl>
</li>
</ul>
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
autocomplete="off"
class="layui-input" th:value="${keyword}">
</div>
<div class="layui-col-xs1" style="padding: 1%">
<button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
</div>
</div>
</div>
<div th:each="book : ${books}" class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
<a th:href="'/book/'+ ${book.id} + '.html'">
<div class="layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2" style="text-align: center" th:switch = "${application.noLazy}">
<img th:case="'1'" align="center"
th:attr="data-src=${book.picUrl}"/>
<img th:case="*" align="center"
class="lazyload" th:attr="data-src=${book.picUrl}"/>
</div>
</a>
<div style="padding: 20px" class="layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8">
<a th:href="'/book/'+ ${book.id} + '.html'">
<div class="line-limit-length" style=";color: #4c6978;font-weight: bold;font-size: 15px"
th:text="${book.bookName}"></div>
</a>
<div style=";color: #4c6978;float: right;"><i style="color: red" th:text="${book.score} + '分'"></i></div>
<a th:href="'/book/searchSoftBook.html?catId=9&keyword='+ ${book.author}">
<div style=";color: #4c6978;" class="line-limit-length" th:text="'作者'+ ${book.author}"></div>
</a>
<div style="margin-top: 5px;color: #4c6978;" th:text="'类别'+ ${book.cateName}"></div>
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态'+ ${book.bookStatus}"></div>
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.updateTime, 'yy-MM-dd')}"></i>
</div>
<div class="layui-collapse" style="margin-top: 5px;">
<div class="layui-colla-item">
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
<div style="color: #4c6978;" class="layui-colla-content" th:utext="${book.bookDesc}">
</div>
</div>
</div>
</div>
</div>
<div id="books" style="text-align: center"></div>
<div th:replace="common/soft_footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="common/js :: js"></div>
<script src="/js/lazyload.js"></script>
<script>
lazyload();
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: $("#total").val() //数据总数,从服务端得到,
, curr: $("#curr").val()
, limit: $("#limit").val()
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
searchByAllCondition(obj.curr,obj.limit);
} else {
}
}
});
});
function searchByAllCondition(curr,limit,newKeyword){
var toUrl = "/book/searchSoftBook.html?catId=9&curr=" + curr + "&limit=" + limit;
var ids = $("#ids").val();
if(ids){
toUrl += ("&historyBookIds=" + ids);
}
var keyword = $("#keyword").val();
if(newKeyword){
toUrl += encodeURI("&keyword=" + newKeyword);
}else if (keyword) {
toUrl += encodeURI("&keyword=" + keyword);
}
var bookStatus = $("#bookStatus").val();
if(bookStatus){
toUrl += ("&bookStatus=" + bookStatus);
}
var softCat = $("#softCat").val();
if (softCat) {
toUrl += ("&softCat=" + softCat);
}
var softTag = $("#softTag").val();
if (softTag) {
toUrl += ("&softTag=" + softTag);
}
var sortBy = $("#sortBy").val();
if (sortBy) {
toUrl += ("&sortBy=" + sortBy);
}
var sort = $("#sort").val();
if (sort) {
toUrl += ("&sort=" + sort);
}
window.location.href = toUrl;
}
function searchBooks() {
var keywords = $("#title").val();
$("#keyword").val("");
searchByAllCondition(1,20,keywords);
}
</script>
<script>
(function(){
var sortCat = $("#softCat").val();
var sortBy = $("#sortBy").val();
if(sortBy == 'score'){
$("#menuhot").addClass("layui-this");
}else if($("#bookStatus").val()){
$("#menucomplete").addClass("layui-this");
}else if(sortCat){
$("#menu"+sortCat).addClass("layui-this");
}else{
$("#menunew").addClass("layui-this");
}
})();
function toMyCollect(){
var token = localStorage.getItem("token");
if(token) {
window.location.href = "/book/search?token=" + token;
}else{
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,294 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.seoConfig.page['soft-search.title']}"></title>
<meta name="keywords" th:content="${application.seoConfig.page['soft-search.keyword']}">
<meta name="description"
th:content="${application.seoConfig.page['soft-search.description']}">
<div th:include="common/css :: css"></div>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 147px;
height: 197px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="softTag" th:value="${softTag}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="softCat" th:value="${softCat}"/>
<ul class="layui-nav" lay-filter="" style="padding:0 20px;text-align: center">
<li id="menunew" class="layui-nav-item"><a href="/book/searchSoftBook.html">最新</a></li>
<li id="menu21" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=21">魔幻</a></li>
<li id="menu22" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=22">玄幻</a></li>
<li id="menu23" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=23">古风</a></li>
<li id="menu24" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=24">科幻</a></li>
<li id="menu25" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=25">校园</a></li>
<li id="menu26" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=26">都市</a></li>
<li id="menu27" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=27">游戏</a></li>
<li id="menu28" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=28">同人</a></li>
<li id="menu29" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=29">悬疑</a></li>
<li id="menu0" class="layui-nav-item"><a href="/book/searchSoftBook.html?softCat=0">动漫</a></li>
<li id="menucomplete" class="layui-nav-item"><a>完本</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成">全部</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=21">魔幻</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=22">玄幻</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=23">古风</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=24">科幻</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=25">校园</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=26">都市</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=27">游戏</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=28">同人</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=29">悬疑</a></dd>
<dd><a href="/book/searchSoftBook.html?bookStatus=已完成&softCat=0">动漫</a></dd>
</dl>
</li>
<li id="menuhot" class="layui-nav-item"><a>排行</a>
<dl class="layui-nav-child"> <!-- 二级菜单 -->
<dd><a href="/book/searchSoftBook.html?sortBy=score">全部</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=21">魔幻</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=22">玄幻</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=23">古风</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=24">科幻</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=25">校园</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=26">都市</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=27">游戏</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=28">同人</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=29">悬疑</a></dd>
<dd><a href="/book/searchSoftBook.html?sortBy=score&softCat=0">动漫</a></dd>
</dl>
</li>
</ul>
<div class="layui-container">
<div class="layui-row">
<div class="layui-col-xs10 layui-col-sm10 layui-col-md11 layui-col-lg11" style="padding-top:1%">
<input id="title" type="text" name="title" required lay-verify="required" placeholder="请输入书名·作者"
autocomplete="off"
class="layui-input" th:value="${keyword}">
</div>
<div class="layui-col-xs1" style="padding: 1%">
<button onclick="searchBooks()" class="layui-btn" lay-submit lay-filter="formDemo">搜索</button>
</div>
</div>
</div>
<div th:each="book : ${books}" class="layui-row" style="margin-bottom:10px;padding:10px;background: #f2f2f2">
<a th:href="'/book/'+ ${book.id} + '.html'">
<div class="layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2" style="text-align: center"
th:switch="${application.noLazy}">
<img th:case="'1'" align="center"
th:attr="data-src=${book.picUrl}"/>
<img th:case="*" align="center"
class="lazyload" th:attr="data-src=${book.picUrl}"/>
</div>
</a>
<div style="padding: 20px" class="layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8">
<a th:href="'/book/'+ ${book.id} + '.html'">
<div class="line-limit-length" style=";color: #4c6978;font-weight: bold;font-size: 15px"
th:text="${book.bookName}"></div>
</a>
<div style=";color: #4c6978;float: right;"><i style="color: red" th:text="${book.score} + '分'"></i></div>
<a th:href="'/book/searchSoftBook.html?keyword='+ ${book.author}">
<div style=";color: #4c6978;" class="line-limit-length" th:text="'作者'+ ${book.author}"></div>
</a>
<div style="margin-top: 5px;color: #4c6978;" th:text="'类别'+ ${book.cateName}"></div>
<div style="margin-top: 5px;color: #4c6978;" th:text="'状态'+ ${book.bookStatus}"></div>
<div style="margin-top: 5px;color: #4c6978;">更新:<i th:text="${#dates.format(book.updateTime, 'yy-MM-dd')}"></i>
</div>
<div class="layui-collapse" style="margin-top: 5px;">
<div class="layui-colla-item">
<h2 style="color: #4c6978;" class="layui-colla-title">简介:</h2>
<div style="color: #4c6978;" class="layui-colla-content" th:utext="${book.bookDesc}">
</div>
</div>
</div>
</div>
</div>
<div id="books" style="text-align: center"></div>
<div th:replace="common/soft_footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="common/js :: js"></div>
<script src="/js/lazyload.js"></script>
<script>
lazyload();
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: $("#total").val() //数据总数,从服务端得到,
, curr: $("#curr").val()
, limit: $("#limit").val()
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
searchByAllCondition(obj.curr, obj.limit);
} else {
}
}
});
});
function searchByAllCondition(curr, limit, newKeyword) {
var toUrl = "/book/searchSoftBook.html?curr=" + curr + "&limit=" + limit;
var ids = $("#ids").val();
if (ids) {
toUrl += ("&historyBookIds=" + ids);
}
var keyword = $("#keyword").val();
if (newKeyword) {
toUrl += encodeURI("&keyword=" + newKeyword);
} else if (keyword) {
toUrl += encodeURI("&keyword=" + keyword);
}
var bookStatus = $("#bookStatus").val();
if (bookStatus) {
toUrl += ("&bookStatus=" + bookStatus);
}
var softCat = $("#softCat").val();
if (softCat) {
toUrl += ("&softCat=" + softCat);
}
var softTag = $("#softTag").val();
if (softTag) {
toUrl += ("&softTag=" + softTag);
}
var sortBy = $("#sortBy").val();
if (sortBy) {
toUrl += ("&sortBy=" + sortBy);
}
var sort = $("#sort").val();
if (sort) {
toUrl += ("&sort=" + sort);
}
window.location.href = toUrl;
}
function searchBooks() {
var keywords = $("#title").val();
$("#keyword").val("");
searchByAllCondition(1, 20, keywords);
}
</script>
<script>
(function () {
var sortCat = $("#softCat").val();
var sortBy = $("#sortBy").val();
if (sortBy == 'score') {
$("#menuhot").addClass("layui-this");
} else if ($("#bookStatus").val()) {
$("#menucomplete").addClass("layui-this");
} else if (sortCat) {
$("#menu" + sortCat).addClass("layui-this");
} else {
$("#menunew").addClass("layui-this");
}
})();
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,24 @@
<div th:fragment="css">
<link rel="stylesheet" href="/mobile/layui/css/layui.css">
<style type="text/css">
.app {
display: none;
}
@media (max-width: 500px) {
.app {
display: block !important;
}
}
.pc {
display: block;
}
@media (max-width: 500px) {
.pc {
display: none;
}
}
</style>
</div>

View File

@ -0,0 +1,14 @@
<div th:fragment="footer" style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>-->
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 14px;color: #fff;margin-left: 8px">书架</a>
<a href="/mobile/fiction_house.apk" style="font-size: 14px;color: #fff;margin-left: 8px">客户端</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>-->
<div style="float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#fff ">&#xe604;</i></a>
</div>
</div>

View File

@ -0,0 +1,3 @@
<script th:fragment="js" src="/mobile/js/jquery-1.9.1.js"></script>
<script th:fragment="js" src="/mobile/layui/layui.all.js"></script>
<script th:fragment="js" src="/mobile/js/common.js"></script>

View File

@ -0,0 +1,19 @@
<div th:fragment="footer" style="height: 60px;line-height: 60px;text-align: center" class="layui-footer footer footer-demo layui-bg-cyan">
<a href="/book" style="font-size: 14px;color: #92B8B1;">更多小说</a>
<a href="javascript:readHistory()" style="font-size: 14px;color: #92B8B1;margin-left: 8px">阅读记录</a>
<a href="javascript:toMyCollect()" style="font-size: 14px;color: #92B8B1;margin-left: 8px">书架</a>
<a href="/mobile/HotBook.apk" style="font-size: 14px;color: #92B8B1;margin-left: 8px">客户端</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #92B8B1;margin-left: 8px">开发者</a>-->
<div style="float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#92B8B1 ">&#xe604;</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>

View File

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

View File

@ -0,0 +1,212 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title>
<meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<meta name="description"
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<div th:include="mobile/common/css :: css"></div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 130px;
height: 180px;
}
.payHead {
height: 36px;
line-height: 36px;
padding: 20px 0 50px;
margin: 0 24px;
font-size: 16px;
border-bottom: 1px solid #eaeaea;
zoom: 1;
}
.pay_way li {
text-align: center;
cursor: pointer;
border: 2px solid #eee;
margin: 20px 0px 3px 43px;
padding-top: 20px;
padding-bottom: 20px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="token" th:value="${token}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="catId" th:value="${catId}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">充值</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<div id="body" class="layui-row">
<div class="payHead cf">
<div class="fl">
充值账号:<span class="user_name" id="my_name">13560421324</span>&nbsp;&nbsp;&nbsp;&nbsp;余额:<em style="color: #3eaf7c" id="accountBalance">10</em> 屋币<!--<em class="red">+0</em>代金券-->
</div>
</div>
<div id="payAmount" class="pay_way layui-row layui-col-space15" style="text-align: center;padding-top: 20px;">
<h5>选择充值金额</h5>
<li vals="10" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>10元</strong><br><span class="pay_mn">1000屋币</span></div>
</div>
</li>
<li vals="30" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>30元</strong><br><span class="pay_mn">3000屋币</span></div>
</div>
</li>
<li vals="50" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>50元</strong><br><span class="pay_mn">5000屋币</span></div>
</div>
</li>
<li vals="100" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>100元</strong><br><span class="pay_mn">10000屋币</span></div>
</div>
</li>
<li vals="200" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>200元</strong><br><span class="pay_mn">20000屋币</span></div>
</div>
</li>
<li vals="500" class="layui-col-xs4 layui-col-sm3 layui-col-md2">
<div class="layui-panel">
<div ><strong>500元</strong><br><span class="pay_mn">50000屋币</span></div>
</div>
</li>
</div>
<form action="/pay/aliPay" method="post" id="payform" name="payform">
<input type="hidden" id="pValue" name="payAmount" />
</form>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="mobile/common/js :: js"></div>
<script>
$("#body").css("min-height",($(window).height() - 100)+"px")
//查询用户信息
$.ajax({
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.nickName){
$("#my_name").html(data.data.nickName);
}else{
$("#my_name").html(data.data.username);
}
$("#accountBalance").html(data.data.accountBalance);
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
$("#payAmount").find("li").click(function () {
$("#pValue").val($(this).attr("vals"));
$("#payform").submit();
});
</script>
</html>

View File

@ -0,0 +1,268 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title>
<meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<meta name="description"
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<div th:include="mobile/common/css :: css"></div>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 130px;
height: 180px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="token" th:value="${token}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="catId" th:value="${catId}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">我的书架</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<div id="body">
<div id="bookList">
</div>
<div id="books" style="text-align: center;"></div>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="mobile/common/js :: js"></div>
<script>
$("#body").css("min-height",($(window).height() - 110)+"px")
search(1,20);
function search(curr,limit) {
$.ajax({
type: "get",
url: "/user/listBookShelfByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
/*var end = book.bookDesc.indexOf("<");
if(end != -1) {
book.bookDesc = book.bookDesc.substring(0,end);
}*/
if(book.bookDesc){
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g,"").replace(/\s+/g,"").replace(/&nbsp;/g,"");
}
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
" src=\""+book.picUrl+"\"/>\n" +
"\n" +
" </div>\n" +
" </a>\n" +
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">"+book.bookName+"</div>\n" +
" </a>\n" +
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
" <a href='/book/"+book.bookId+"/"+book.preContentId+".html'>\n" +
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:"+book.authorName+"</div>\n" +
" </a>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:"+book.catName+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:"+(book.bookStatus==0?'连载':'完结')+"</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>"+book.lastIndexUpdateTime.substr(0,11)+"</i>\n" +
" </div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:"+(book.bookDesc?(book.bookDesc.length>15?(book.bookDesc.substr(0,15)+"..."):book.bookDesc):book.bookDesc)+"</div>\n" +
"\n" +
"\n" +
" </div>\n" +
"\n" +
" </div>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function searchByAllCondition(curr, limit, newKeyword) {
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
var ids = $("#ids").val();
if (ids) {
toUrl += ("&historyBookIds=" + ids);
}
var token = $("#token").val();
if (token) {
toUrl += ("&token=" + token);
}
var keyword = $("#keyword").val();
if (newKeyword) {
toUrl += encodeURI("&keyword=" + newKeyword);
} else if (keyword) {
toUrl += encodeURI("&keyword=" + keyword);
}
var bookStatus = $("#bookStatus").val();
if (bookStatus) {
toUrl += ("&bookStatus=" + bookStatus);
}
var catId = $("#catId").val();
if (catId) {
toUrl += ("&catId=" + catId);
}
var sortBy = $("#sortBy").val();
if (sortBy) {
toUrl += ("&sortBy=" + sortBy);
}
var sort = $("#sort").val();
if (sort) {
toUrl += ("&sort=" + sort);
}
window.location.href = toUrl;
}
function searchBooks() {
var keywords = $("#title").val();
$("#keyword").val("");
searchByAllCondition(1, 20, keywords);
}
</script>
<script>
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,118 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>登录</title>
<div th:include="mobile/common/css :: css"></div>
</head>
<body id="read">
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">登录</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item">
<label class="layui-form-label">手机号码</label>
<div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">密码</label>
<div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<input id="autoLogin" type="checkbox" lay-skin="primary" title="下次自动登录">
</div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<input type="button" value="登录" id="btnLogin" class="layui-btn" />
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<div th:replace="mobile/common/footer :: footer">
</div>
</body>
<div th:replace="mobile/common/js :: js">
</div>
<script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px")
if(localStorage.getItem("autoLogin")==1){
$("#autoLogin").prop("checked",'true');
layui.form.render('checkbox','loginForm');
}else{
$("#autoLogin").removeAttr("checked");
}
$("#btnLogin").click(function () {
var username = $("#txtUName").val();
if(username.isBlank()){
layer.alert("手机号不能为空");
return;
}
if(!username.isPhone()){
layer.alert("手机号格式不正确");
return;
}
var password = $("#txtPassword").val();
if(password.isBlank()){
layer.alert("密码不能为空");
return;
}
$.ajax({
type: "POST",
url: "/user/login",
data: {"username": username, "password": password},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if($("#autoLogin").is(':checked')){
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' });
localStorage.setItem("autoLogin","1");
}else {
$.cookie('Authorization', data.data.token,{ path: '/' });
localStorage.setItem("autoLogin","0");
}
var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
})
</script>
</html>

View File

@ -0,0 +1,266 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}+'列表'"></title>
<meta name="keywords"
th:content="${application.website.name}+',精品小说,弹幕网站,弹幕,弹幕小说网站,免费小说,小说阅读,小说排行,轻小说,txt小说下载,电子书下载,动漫轻小说,日本轻小说'">
<meta name="description"
th:content="${application.website.name}+'是国内优秀的小说弹幕网站,'+${application.website.name}+'提供海量热门网络小说,日本轻小说,国产轻小说,动漫小说,轻小说在线阅读和TXT小说下载,致力于网络精品小说的收集,智能计算小说评分,打造小说精品排行榜,致力于无广告无弹窗的小说阅读环境。'">
<div th:include="mobile/common/css :: css"></div>
</div>
<style type="text/css">
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.indexP p a {
color: #4c6978;
}
.Readarea {
font-size: 18px;
line-height: 35px;
padding: 10px;
color: #333;
}
div, p {
wrap-work: break-word;
word-break: break-all;
word-wrap: break-word;
word-break: normal;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
-ms-box-sizing: border-box;
}
.indexDiv a {
margin-left: 20px;
}
img {
width: 130px;
height: 180px;
}
</style>
</head>
<body>
<input type="hidden" id="limit" th:value="${limit}"/>
<input type="hidden" id="curr" th:value="${curr}"/>
<input type="hidden" id="total" th:value="${total}"/>
<input type="hidden" id="ids" th:value="${ids}"/>
<input type="hidden" id="bookStatus" th:value="${bookStatus}"/>
<input type="hidden" id="token" th:value="${token}"/>
<input type="hidden" id="keyword" th:value="${keyword}"/>
<input type="hidden" id="catId" th:value="${catId}"/>
<input type="hidden" id="sortBy" th:value="${sortBy}"/>
<input type="hidden" id="sort" th:value="${sort}"/>
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">阅读历史</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<div id="body">
<div id="bookList">
</div>
<div id="books" style="text-align: center;"></div>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
<a name="buttom"></a>
</body>
<div th:replace="mobile/common/js :: js"></div>
<script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20);
function search(curr, limit) {
$.ajax({
type: "get",
url: "/user/listReadHistoryByPage",
data: {'curr': curr, 'limit': limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
var bookListHtml = "";
for (var i = 0; i < bookList.length; i++) {
var book = bookList[i];
/*var end = book.bookDesc.indexOf("<");
if(end != -1) {
book.bookDesc = book.bookDesc.substring(0,end);
}*/
if (book.bookDesc) {
book.bookDesc = book.bookDesc.replace(/<[^>]+>/g, "").replace(/\s+/g, "").replace(/&nbsp;/g, "");
}
bookListHtml += ("<div class=\"layui-row\" style=\"margin-bottom:10px;padding:10px;background: #f2f2f2\">\n" +
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
" <div class=\"layui-col-xs6 layui-col-sm3 layui-col-md2 layui-col-lg2\" style=\"text-align: center\">\n" +
" <img style='width: 130px;height: 180px' align=\"center\"\n" +
" src=\"" + book.picUrl + "\"/>\n" +
"\n" +
" </div>\n" +
" </a>\n" +
" <div style=\"padding: 10px\" class=\"layui-col-xs6 layui-col-sm8 layui-col-md8 layui-col-lg8\">\n" +
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
" <div class=\"line-limit-length\" style=\";color: #000;font-size: 15px\">" + book.bookName + "</div>\n" +
" </a>\n" +
" <div style=\";color: #4c6978;float: right;\"><i style=\"color: red\"></i></div>\n" +
" <a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>\n" +
" <div style=\";color: #a6a6a6;\" class=\"line-limit-length\">作者:" + book.authorName + "</div>\n" +
" </a>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">类别:" + book.catName + "</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">状态:" + (book.bookStatus == 0 ? '连载' : '完结') + "</div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">更新:<i style='color: red'>" + book.lastIndexUpdateTime.substr(0, 11) + "</i>\n" +
" </div>\n" +
" <div style=\"margin-top: 5px;color: #a6a6a6;\">简介:" + (book.bookDesc ? (book.bookDesc.length > 15 ? (book.bookDesc.substr(0, 15) + "...") : book.bookDesc) : book.bookDesc) + "</div>\n" +
"\n" +
"\n" +
" </div>\n" +
"\n" +
" </div>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'books' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function searchByAllCondition(curr, limit, newKeyword) {
var toUrl = "/book/search?curr=" + curr + "&limit=" + limit;
var ids = $("#ids").val();
if (ids) {
toUrl += ("&historyBookIds=" + ids);
}
var token = $("#token").val();
if (token) {
toUrl += ("&token=" + token);
}
var keyword = $("#keyword").val();
if (newKeyword) {
toUrl += encodeURI("&keyword=" + newKeyword);
} else if (keyword) {
toUrl += encodeURI("&keyword=" + keyword);
}
var bookStatus = $("#bookStatus").val();
if (bookStatus) {
toUrl += ("&bookStatus=" + bookStatus);
}
var catId = $("#catId").val();
if (catId) {
toUrl += ("&catId=" + catId);
}
var sortBy = $("#sortBy").val();
if (sortBy) {
toUrl += ("&sortBy=" + sortBy);
}
var sort = $("#sort").val();
if (sort) {
toUrl += ("&sort=" + sort);
}
window.location.href = toUrl;
}
function searchBooks() {
var keywords = $("#title").val();
$("#keyword").val("");
searchByAllCondition(1, 20, keywords);
}
</script>
<script>
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/search?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
</script>
</html>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html>
<html lang="en">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>注册</title>
<div th:include="mobile/common/css :: css"></div>
</head>
<body id="read">
<div style="height: 50px;line-height: 50px;text-align: center" class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">注册</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<form lay-filter="loginForm" id="form1" style="height: 500px;padding-top:30px;padding-right: 20px" class="layui-form" action="">
<input type="hidden" id="bookIdHidden" name="bookId" th:value="${bookId}"/>
<div class="layui-form-item">
<label class="layui-form-label">手机号码</label>
<div class="layui-input-inline">
<input name="txtUName" type="text" id="txtUName" placeholder="请输入手机号"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">密码</label>
<div class="layui-input-inline">
<input name="txtPassword" type="password" id="txtPassword" placeholder="请输入密码"
autocomplete="off" class="layui-input">
</div>
</div>
<div class="layui-form-item ">
<label class="layui-form-label">验证码</label>
<div class="layui-input-inline">
<input name="txtUName" type="text" id="TxtChkCode" placeholder="请输入验证码"
autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline"><img
style="border: 1px solid #eee" class="code_pic" src="" id="chkd"
onclick="getVerify(this);"/></div>
</div>
<div class="layui-form-item">
<div class="layui-input-block">
<input type="button" value="注册" id="btnRegister" class="layui-btn" />
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
</div>
</div>
</form>
<div th:replace="mobile/common/footer :: footer">
</div>
</body>
<div th:replace="mobile/common/js :: js">
</div>
<script type="text/javascript">
$("#form1").css("min-height",($(window).height() - 140)+"px")
$("#chkd").click();
$("#btnRegister").click(function () {
var username = $("#txtUName").val();
if (username.isBlank()) {
layer.alert("手机号不能为空");
return;
}
if (!username.isPhone()) {
layer.alert("手机号格式不正确");
return;
}
var password = $("#txtPassword").val();
if (password.isBlank()) {
layer.alert("密码不能为空");
return;
}
var velCode = $("#TxtChkCode").val();
if (velCode.isBlank()) {
layer.alert("验证码不能为空");
return;
}
$.ajax({
type: "POST",
url: "/user/register",
data: {"username": username, "password": password,"velCode":velCode},
dataType: "json",
success: function (data) {
if (data.code == 200) {
$.cookie('Authorization', data.data.token, {path: '/'});
window.location.href="/";
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
})
//获取验证码
function getVerify(obj) {
obj.src = "/file/getVerify?" + Math.random();
}
</script>
</html>

View File

@ -0,0 +1,282 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title th:text="${application.website.name}"></title>
<meta name="keywords" th:content="${application.website.keyword}"/>
<meta name="description"
th:content="${application.website.description}"/>
<div th:include="mobile/common/css :: css"></div>
<style>
.line-limit-length {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.layui-nav .layui-nav-item {
position: relative;
display: inline-block;
vertical-align: middle;
line-height: 50px;
}
body ul.layui-nav li.layui-nav-item a {
display: block;
transition: all .3s;
-webkit-transition: all .3s;
}
.user_link {
position: relative;
display: inline-block;
vertical-align: middle;
line-height: 50px;
padding: 0 20px;
color: #fff;
float: right;
}
.user_link a {
color: #fff;
}
.user_big_head {
width: 80px;
height: 80px;
border-radius: 50%;
}
</style>
</head>
<body>
<div id="body">
<!-- 你的HTML代码 -->
<div style="height: 50px;line-height: 50px;text-align: center"
class="layui-header header header-doc layui-bg-cyan">
<div style="width:10%;float: left;margin-left: 10px">
<a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a>
</div>
<b class="layui-icon">用户中心</b>
<div style="width:10%;float: right;margin-right: 10px"><a href="/">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe68e;</i>
</a>
</div>
</div>
<div class="layui-colla-item">
<div class="layui-container" style="padding: 50px;text-align: center">
<img id="imgLogo" class="user_big_head" src="/images/man.png">
<div style="padding: 10px;font-size: 18px"><span id="my_name">梦入神机</span>
<svg id="boyIcon" style="display: none" t="1693635090733" class="icon" viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="8815" width="15" height="15">
<path d="M872.335 421.516V151.71H602.528L702.949 252.13 601.4 353.68c-46.47-32.81-103.174-52.091-164.385-52.091-157.595 0-285.351 127.756-285.351 285.35S279.421 872.29 437.014 872.29s285.352-127.755 285.352-285.35c0-57.78-17.19-111.537-46.711-156.47l102.818-102.814 93.862 93.861zM437.015 782.18c-107.827 0-195.24-87.413-195.24-195.24s87.413-195.24 195.24-195.24 195.24 87.413 195.24 195.24-87.413 195.24-195.24 195.24z"
fill="#1296DB" p-id="8816"></path>
</svg>
<svg id="girlIcon" style="display: none" t="1693635698738" class="icon" viewBox="0 0 1024 1024"
version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3685" width="15" height="15">
<path d="M513 636.1c-76.4 0-148.2-29.7-202.2-83.8-54-54-83.8-125.8-83.8-202.2s29.7-148.2 83.8-202.2c54-54 125.8-83.8 202.2-83.8s148.2 29.7 202.2 83.8c54 54 83.8 125.8 83.8 202.2s-29.7 148.2-83.8 202.2c-54 54.1-125.8 83.8-202.2 83.8z m0-515.9c-61.4 0-119.2 23.9-162.6 67.4C307 231 283 288.7 283 350.1s23.9 119.2 67.4 162.6 101.2 67.4 162.6 67.4 119.2-23.9 162.6-67.4S743 411.6 743 350.1 719 231 675.6 187.5c-43.4-43.4-101.2-67.3-162.6-67.3z"
fill="#d4237a" p-id="3686"></path>
<path d="M671.4 712.1H544.7v-104h-56v104H362c-15.5 0-28 12.5-28 28s12.5 28 28 28h126.7v163.3c0 15.5 12.5 28 28 28s28-12.5 28-28V768.1h126.7c15.5 0 28-12.5 28-28s-12.5-28-28-28z"
fill="#d4237a" p-id="3687"></path>
</svg>
</div>
<div style="padding: 5px;">账户余额<span id="accountBalance" style="color: #3eaf7c">3000</span> 屋币</div>
</div>
</div>
<div style="clear: both"></div>
<a
href="/pay/index.html">
<div
style="background-color:#fafafa;text-align: left;padding:20px 10px 30px;color: #000;font-size: 16px">
<div style="float: left;">
<svg t="1697073258970" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="4079" width="25px" height="25px">
<path d="M768 30.72 283.306667 30.72c-51.2 0-98.986667 44.373333-98.986667 98.986667l0 747.52c0 51.2 44.373333 95.573333 98.986667 95.573333l300.373333 0c0 0 71.68 0 116.053333 23.893333 3.413333 0 3.413333 3.413333 6.826667 3.413333 6.826667 0 10.24-3.413333 13.653333-6.826667 3.413333-6.826667 0-17.066667-6.826667-20.48-51.2-30.72-126.293333-30.72-129.706667-30.72L283.306667 942.08c-37.546667 0-64.853333-30.72-64.853333-64.853333L218.453333 129.706667c0-37.546667 30.72-64.853333 64.853333-64.853333l484.693333 0c37.546667 0 68.266667 30.72 68.266667 64.853333l0 747.52c0 37.546667-30.72 64.853333-68.266667 64.853333-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667c51.2 0 98.986667-44.373333 98.986667-95.573333L866.986667 129.706667C866.986667 78.506667 819.2 30.72 768 30.72z"
fill="#3eaf7c" p-id="4080"></path>
<path d="M604.16 102.4 443.733333 102.4c-6.826667 0-17.066667 6.826667-17.066667 17.066667S436.906667 136.533333 443.733333 136.533333l160.426667 0c6.826667 0 17.066667-6.826667 17.066667-17.066667S610.986667 102.4 604.16 102.4z"
fill="#3eaf7c" p-id="4081"></path>
<path d="M344.746667 307.2c-6.826667 6.826667-6.826667 17.066667 0 20.48l81.92 81.92c3.413333 3.413333 6.826667 3.413333 10.24 3.413333s6.826667 0 10.24-3.413333c6.826667-6.826667 6.826667-17.066667 0-20.48L365.226667 307.2C358.4 300.373333 351.573333 300.373333 344.746667 307.2z"
fill="#3eaf7c" p-id="4082"></path>
<path d="M604.16 409.6c3.413333 3.413333 6.826667 3.413333 10.24 3.413333s6.826667 0 10.24-3.413333l81.92-81.92c6.826667-6.826667 6.826667-17.066667 0-20.48s-17.066667-6.826667-20.48 0l-81.92 81.92C597.333333 395.946667 597.333333 402.773333 604.16 409.6z"
fill="#3eaf7c" p-id="4083"></path>
<path d="M716.8 460.8c6.826667 0 17.066667-6.826667 17.066667-17.066667s-6.826667-17.066667-17.066667-17.066667L334.506667 426.666667c-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667L512 460.8l0 105.813333L334.506667 566.613333c-6.826667 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667L512 600.746667l0 139.946667c0 6.826667 6.826667 17.066667 17.066667 17.066667s17.066667-6.826667 17.066667-17.066667l0-139.946667L716.8 600.746667c6.826667 0 17.066667-6.826667 17.066667-17.066667s-6.826667-17.066667-17.066667-17.066667l-174.08 0 0-105.813333L716.8 460.8z"
fill="#3eaf7c" p-id="4084"></path>
</svg>
</div>
<div style="float: left; margin-left: 20px">充值</div>
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
class="layui-icon">&#xe602;</i>
</div>
</div>
</a>
<a
href="/user/favorites.html">
<div
style="background-color:#fafafa;text-align: left;padding:30px 10px;color: #000;font-size: 16px">
<div style="float: left;">
<svg t="1693622464904" class="icon" viewBox="0 0 1097 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg" p-id="3653" width="25px" height="25px">
<path d="M998.58390632 852.14701166H126.84569332A41.51236 41.51236 0 0 0 85.33333332 893.65937166v62.26854a41.51236 41.51236 0 0 0 41.51236 41.51236h871.738213a41.51236 41.51236 0 0 0 41.51236-41.51236v-62.26854a41.51236 41.51236 0 0 0-41.51236-41.51236z m-29.293426 83.014048h-813.172704a8.537246 8.537246 0 0 1-8.537246-8.537246v-3.681687a8.537246 8.537246 0 0 1 8.537246-8.537247h813.172704a8.537246 8.537246 0 0 1 8.537246 8.537247v3.681687a8.537246 8.537246 0 0 1-8.537246 8.537246zM126.84569332 810.63465166h124.537079a41.51236 41.51236 0 0 0 41.51236-41.51236V229.47228566a41.51236 41.51236 0 0 0-41.51236-41.51236H126.84569332A41.51236 41.51236 0 0 0 85.33333332 229.47228566v539.650006a41.51236 41.51236 0 0 0 41.51236 41.51236zM156.72605532 246.49342066h64.883071a12.805869 12.805869 0 0 1 12.805869 12.805869v479.995998a12.805869 12.805869 0 0 1-12.805869 12.80587H156.72605532a12.805869 12.805869 0 0 1-12.80587-12.80587V259.29928966a12.805869 12.805869 0 0 1 12.80587-12.805869z m239.939305 564.141231h124.53708a41.51236 41.51236 0 0 0 41.51236-41.51236V278.62548066l291.653674 510.335237 0.266789 0.480221a41.619075 41.619075 0 0 0 56.826045 15.527116l107.932136-62.962191A42.600859 42.600859 0 0 0 1034.18422332 684.02729066L727.73976932 147.49337866l-0.266789-0.48022a41.619075 41.619075 0 0 0-56.826045-15.527116l-107.932135 62.962191V84.17902666A41.51236 41.51236 0 0 0 521.20244032 42.66666666h-124.53708a41.51236 41.51236 0 0 0-41.51236 41.51236v684.943265a41.51236 41.51236 0 0 0 41.51236 41.51236z m296.295802-597.938055a3.735045 3.735045 0 0 1 5.122348 1.376631l259.841761 454.608363a12.805869 12.805869 0 0 1-4.663471 17.415982l-56.271124 32.825712a12.805869 12.805869 0 0 1-17.544041-4.663471L624.11894332 267.59109066a12.805869 12.805869 0 0 1 4.663471-17.415983zM426.49236432 101.20016166h64.883072a12.805869 12.805869 0 0 1 12.805869 12.805869v625.289257a12.805869 12.805869 0 0 1-12.805869 12.80587h-64.883072a12.805869 12.805869 0 0 1-12.805869-12.80587V114.00603066a12.805869 12.805869 0 0 1 12.805869-12.805869z m0 0"
p-id="3654" fill="#3eaf7c"></path>
</svg>
</div>
<div style="float: left; margin-left: 20px">我的书架</div>
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
class="layui-icon">&#xe602;</i>
</div>
</div>
</a>
<a
href="/user/read_history.html">
<div
style="background-color:#fafafa;text-align: left;padding:30px 10px 50px;color: #000;font-size: 16px">
<div style="float: left;">
<svg t="1693621172669" class="icon" viewBox="0 0 1024 1024" version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="1877" width="25px" height="25px">
<path d="M876.8 709.12H738.56V591.36c0-15.36-10.24-25.6-25.6-25.6-15.36 0-25.6 10.24-25.6 25.6v143.36c0 15.36 10.24 25.6 25.6 25.6H876.8c15.36 0 25.6-10.24 25.6-25.6s-12.8-25.6-25.6-25.6zM705.28 463.36c-153.6 0-279.04 125.44-279.04 279.04 0 153.6 125.44 279.04 279.04 279.04 153.6 0 279.04-125.44 279.04-279.04 0-153.6-125.44-276.48-279.04-279.04z m0 506.88c-125.44 0-227.84-102.4-227.84-227.84s102.4-227.84 227.84-227.84 227.84 102.4 227.84 227.84c-2.56 128-102.4 227.84-227.84 227.84z m25.6-622.08c0-15.36-10.24-25.6-25.6-25.6h-473.6c-15.36 0-25.6 10.24-25.6 25.6 0 15.36 10.24 25.6 25.6 25.6h473.6c12.8 0 25.6-10.24 25.6-25.6z m-307.2 207.36c0-15.36-10.24-25.6-25.6-25.6h-166.4c-15.36 0-25.6 10.24-25.6 25.6s10.24 25.6 25.6 25.6h166.4c15.36 0 25.6-12.8 25.6-25.6z m-192 153.6c-15.36 0-25.6 10.24-25.6 25.6s10.24 25.6 25.6 25.6h128c15.36 0 25.6-10.24 25.6-25.6s-10.24-25.6-25.6-25.6h-128zM482.56 972.8H90.88V51.2h174.08v38.4c0 33.28 25.6 64 58.88 64 12.8 0 343.04 2.56 373.76 0 33.28 0 58.88-28.16 56.32-61.44v-38.4H928v437.76c0 15.36 10.24 25.6 25.6 25.6 15.36 0 25.6-10.24 25.6-25.6V28.16c0-15.36-10.24-25.6-25.6-25.6H728.32c-15.36 0-25.6 10.24-25.6 25.6v64c0 7.68-5.12 12.8-10.24 12.8H326.4c-7.68 0-12.8-5.12-12.8-12.8V25.6C313.6 10.24 303.36 0 288 0H65.28c-15.36 0-25.6 10.24-25.6 25.6v972.8c0 15.36 10.24 25.6 25.6 25.6h417.28c15.36 0 25.6-10.24 25.6-25.6 0-15.36-12.8-25.6-25.6-25.6zM395.52 51.2h230.4c15.36 0 25.6-10.24 25.6-25.6 0-15.36-10.24-25.6-25.6-25.6h-230.4c-15.36 0-25.6 10.24-25.6 25.6 0 15.36 12.8 25.6 25.6 25.6z"
fill="#3eaf7c" p-id="1878"></path>
</svg>
</div>
<div style="float: left; margin-left: 20px">阅读历史</div>
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
class="layui-icon">&#xe602;</i>
</div>
</div>
</a>
<!--<a
href="/user/comment.html">
<blockquote class="layui-elem-quote"
style="background-color:#fafafa;border-left:0px;margin-bottom: 0px;text-align: left;padding:15px 10px;color: #000;font-size: 18px">
<i style="font-size: 25px;padding-right: 20px;color:#3eaf7c"
class="layui-icon">&#xe611;
</i>
我的书评
<div style="float: right; margin-right: 20px"><i style="font-size: 14px;color:#666"
class="layui-icon">&#xe602;</i>
</div>
</blockquote>
</a>-->
<a
href="javascript:logout()">
<blockquote class="layui-elem-quote"
style="background-color:#fafafa;border-left:0px;margin-top:10px;margin-bottom: 10px;text-align: center;padding:15px 10px;color: #3eaf7c;font-size: 16px">
退出登录
</blockquote>
</a>
</div>
<div th:replace="mobile/common/footer :: footer">
</div>
</body>
<div th:replace="mobile/common/js :: js">
</div>
<script>
$("#body").css("min-height", ($(window).height() - 50) + "px")
//查询用户信息
$.ajax({
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if (data.data.userPhoto) {
$("#imgLogo").attr("src", data.data.userPhoto);
}
if (data.data.nickName) {
$("#my_name").html(data.data.nickName);
} else {
$("#my_name").html(data.data.username);
}
if (data.data.userSex === '0') {
$("#boyIcon").css("display", "inline")
}
if (data.data.userSex === '1') {
$("#girlIcon").css("display", "inline")
}
$("#accountBalance").html(data.data.accountBalance);
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
function moreNewBooks(event) {
window.location.href = "/book/book_ranking.html?sortBy=last_index_update_time";
}
function searchBooks() {
var keywords = $("#title").val();
window.location.href = "/book/book_ranking.html?keyword=" + encodeURI(keywords);
}
function toMyCollect() {
var token = localStorage.getItem("token");
if (token) {
window.location.href = "/book/book_ranking.html?token=" + token;
} else {
window.location.href = "/user/login.html";
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,136 @@
<!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="'充值_'+${application.website.name}"></title>
<link rel="stylesheet" href="/css/base.css"/>
<link rel="stylesheet" href="/css/main.css"/>
</head>
<body class="">
<div th:replace="common/top :: top('')">
</div>
<form action="/pay/aliPay" method="post" id="payform" name="payform">
<div class="main box_center cf">
<div class="channelWrap channelPay cf">
<div class="payBox cf">
<div class="payHead cf">
<div class="fl">
充值账号:<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+0</em>代金券-->
</div>
</div>
<div class="payCon">
<h5>选择充值方式</h5>
<ul class="pay_way cf" id="ulPayType">
<li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付" /></li>
<li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付" /></li>
</ul>
<h5>选择充值金额</h5>
<ul class="pay_way cf" id="ulZFWX">
<li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li>
<li vals="30"><strong>30元</strong><span class="pay_mn">3000屋币</span></li>
<li vals="50"><strong>50元</strong><span class="pay_mn">5000屋币<!--<em class="red">+ 送500代金券</em>--></span></li>
<li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币<!--<em class="red">+ 送1200代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币<!--<em class="red">+ 送3000代金券</em>--></span></li>
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币<!--<em class="red">+ 送10000代金券</em>--></span></li>
</ul>
<ul class="pay_way cf" style="display:none;" id="ulPayPal">
<li vals="20"><strong>20美元</strong><span class="pay_mn">10000屋币</span></li>
<li vals="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span></li>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span></li>
</ul>
<ul class="pay_Checkout" id="ulZFWXXJ">
<li>当前汇率1元=100屋币</li>
<li>总计金额:<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币<!--+500代金券--></em></li>
<li style="display:none"><a class="btn_red" href="pay_success.html" onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul>
<ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ">
<li>当前汇率1美元=500屋币</li>
<li>总计金额:<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red" id="showPayPalRemark">25000屋币</em></li>
<li style="display:none"><a class="btn_red" href="javascript:void(0);" onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul>
</div>
<div class="payFoot">
<strong class="tip_tit">温馨提示</strong>
<ul class="tip_list">
<li>1. 充值阅读权限仅限本书城使用</li>
<li>2. 充值支持信用卡、借记卡、支付宝余额、微信零钱等支付</li>
<li>3. 包年时间是365天重复购买时间会累加</li>
<li>4. 若充值遇到问题,<a href="/user/feedback.html" target="_blank" class="unlink black9">点此留言</a></li>
</ul>
</div>
</div>
</div>
</div>
<input type="hidden" id="pValue" name="payAmount" />
</form>
<div th:replace="common/footer :: footer">
</div>
<div th:replace="common/js :: js"></div>
<script src="/javascript/pay.js" type="text/javascript"></script>
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.nickName){
$("#my_name").html(data.data.nickName);
}else{
$("#my_name").html(data.data.username);
}
$("#accountBalance").html(data.data.accountBalance);
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
$("#ulZFWX").find("li").click(function () {
var payType = $("#ulPayType").find("li.on").attr("valp");
if(payType == 2){
layer.alert("微信支付暂未开通敬请期待");
return ;
}
$("#pValue").val($(this).attr("vals"));
$("#payform").submit();
});
</script>
</body>
</html>

View 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="'我的书评_'+${application.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: "get",
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>

View 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="'我的书架_'+${application.website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.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: "get",
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>

View File

@ -0,0 +1,92 @@
<!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="'反馈留言_'+${application.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();">
<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>

View 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="'我的反馈_'+${application.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: "get",
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>

View File

@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'会员登录_'+${application.website.name}"></title>
<meta name="keywords" th:content="'会员登录,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" />
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.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">
<h3 th:text="'登陆'+${application.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>

View 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="'最近阅读_'+${application.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: "get",
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>

View File

@ -0,0 +1,122 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'会员注册_'+${application.website.name}"></title>
<meta name="keywords" th:content="'会员注册,个人中心,'+${application.website.name}+'小说,'+${application.website.name}"/>
<meta name="description"
th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.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="user_l">
<h3 th:text="'注册'+${application.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>

View File

@ -0,0 +1,114 @@
<!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="'修改昵称_'+${application.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><input name="txtNiceName" type="text" value="15171695474"
maxlength="20" id="txtNiceName" class="s_input"
placeholder=""/></li>
<li><i class="tit">&nbsp;</i>用户名只能包括汉字、英文字母、数字和下划线</li>
<li><i class="tit">&nbsp;</i><input type="button" onclick="updateName()" name="btn" value="修改"
id="btn" class="s_btn btn_red"/></li>
<li><i class="tit">&nbsp;</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: "get",
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) {
$.cookie('Authorization', data.data.token, {path: '/'});
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>

View File

@ -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},~{},~{::link},~{})">
<title th:text="'修改密码_'+${application.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><input name="oldPass" type="password" id="txtOldPass" class="s_input" placeholder="请输入原密码" /></li>
<li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li>
<li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2" class="s_input" placeholder="请确认新密码" /></li>
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li>
<li><i class="tit">&nbsp;</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>

View File

@ -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="'修改性别_'+${application.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>
<label><input type="radio" name="sex" value="0" />&nbsp;男生</label>
<label><input class="ml20" type="radio" name="sex" value="1" checked />&nbsp;女生</label>
</li>
<li class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
<li><i class="tit">&nbsp;</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: "get",
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>

View File

@ -0,0 +1,150 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+${application.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 style="position: relative" >
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" />
<input class="opacity" onchange="picChange()" type="file" id="file0" name="file" title="点击上传图片" style="z-index: 100;cursor: pointer;left: 0px; top: -25px; width: 60px; height: 80px; opacity: 0; position: absolute; "/>
</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 src="/javascript/ajaxfileupload.js" type="text/javascript"></script>
<script type="text/javascript">
//查询用户信息
$.ajax({
type: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.userPhoto){
$("#imgLogo").attr("src",data.data.userPhoto);
}
if(data.data.nickName){
$("#my_name").html(data.data.nickName+"<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('网络异常');
}
})
function picChange() {
var file = $("#file0").val(); //文件名称
if (file != "") {
if(checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址
secureuri: false, //是否需要安全协议一般设置为false
fileElementId: "file0", //文件上传域的ID
dataType: "json", //返回值类型 一般设置为json
type: "post",
success: function (data) { //服务器成功响应处理函数
if (data.code == 200) {
$.ajax({
type: "POST",
url: "/user/updateUserInfo",
data: {'userPhoto': data.data},
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('网络异常');
}
})
} else {
layer.alert(data.msg);
}
}
});
}
} else {
alert("请选择上传文件!");
}
}
</script>
</body>
</html>

View 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 th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'个人中心_'+${application.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" id="accountBalance">0</em>屋币<!--<em class="red">+</em><em class="red">0</em>代金券--><a href="/pay/index.html" 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">全部收藏 &gt;</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: "get",
url: "/user/userInfo",
data: {},
dataType: "json",
success: function (data) {
if (data.code == 200) {
if(data.data.userPhoto){
$("#imgLogo").attr("src",data.data.userPhoto);
}
if(data.data.nickName){
$("#my_name").html(data.data.nickName);
}else{
$("#my_name").html(data.data.username);
}
$("#accountBalance").html(data.data.accountBalance);
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
} else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
//查询书架列表
$.ajax({
type: "get",
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>