mirror of
https://github.com/201206030/novel-plus.git
synced 2025-06-24 04:46:37 +00:00
feat(templates): 新增绿色主题模版,并设置为默认模版
和文档站点 docs.xxyopen.com 风格保持一致
This commit is contained in:
127
templates/green/html/user/comment.html
Normal file
127
templates/green/html/user/comment.html
Normal file
@ -0,0 +1,127 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
|
||||
<title th:text="'我的书评_'+${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>
|
161
templates/green/html/user/favorites.html
Normal file
161
templates/green/html/user/favorites.html
Normal file
@ -0,0 +1,161 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
|
||||
<title th:text="'我的书架_'+${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>
|
92
templates/green/html/user/feedback.html
Normal file
92
templates/green/html/user/feedback.html
Normal 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>
|
127
templates/green/html/user/feedback_list.html
Normal file
127
templates/green/html/user/feedback_list.html
Normal file
@ -0,0 +1,127 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
|
||||
<title th:text="'我的反馈_'+${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>
|
103
templates/green/html/user/login.html
Normal file
103
templates/green/html/user/login.html
Normal 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>
|
149
templates/green/html/user/read_history.html
Normal file
149
templates/green/html/user/read_history.html
Normal file
@ -0,0 +1,149 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
|
||||
<title th:text="'最近阅读_'+${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>
|
122
templates/green/html/user/register.html
Normal file
122
templates/green/html/user/register.html
Normal 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>
|
114
templates/green/html/user/set_name.html
Normal file
114
templates/green/html/user/set_name.html
Normal 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"> </i>用户名只能包括汉字、英文字母、数字和下划线</li>
|
||||
<li><i class="tit"> </i><input type="button" onclick="updateName()" name="btn" value="修改"
|
||||
id="btn" class="s_btn btn_red"/></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "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>
|
90
templates/green/html/user/set_password.html
Normal file
90
templates/green/html/user/set_password.html
Normal 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"> </i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li>
|
||||
<li><i class="tit"> </i><input name="txtNewPass2" type="password" id="txtNewPass2" class="s_input" placeholder="请确认新密码" /></li>
|
||||
<li><i class="tit"> </i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
function updatePassword() {
|
||||
var oldPassword = $("#txtOldPass").val();
|
||||
if (oldPassword.isBlank()) {
|
||||
$("#LabErr").html("旧密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var newPassword1 = $("#txtNewPass1").val();
|
||||
if (newPassword1.isBlank()) {
|
||||
$("#LabErr").html("新密码不能为空!");
|
||||
return;
|
||||
}
|
||||
var newPassword2 = $("#txtNewPass2").val();
|
||||
if (newPassword2.isBlank()) {
|
||||
$("#LabErr").html("确认密码不能为空!");
|
||||
return;
|
||||
}
|
||||
if(newPassword1 !== newPassword2){
|
||||
$("#LabErr").html("两次输入的新密码不匹配!");
|
||||
return;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/user/updatePassword",
|
||||
data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2},
|
||||
dataType: "json",
|
||||
success: function (data) {
|
||||
if (data.code == 200) {
|
||||
window.location.href = '/user/setup.html';
|
||||
|
||||
} else if (data.code == 1001) {
|
||||
//未登录
|
||||
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
|
||||
|
||||
} else {
|
||||
$("#LabErr").html(data.msg);
|
||||
}
|
||||
|
||||
},
|
||||
error: function () {
|
||||
layer.alert('网络异常');
|
||||
}
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
99
templates/green/html/user/set_sex.html
Normal file
99
templates/green/html/user/set_sex.html
Normal 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" /> 男生</label>
|
||||
<label><input class="ml20" type="radio" name="sex" value="1" checked /> 女生</label>
|
||||
</li>
|
||||
<li class="mt20"><i class="tit"> </i><input type="button" onclick="updateSex()" name="btn" value="修改" id="btn" class="s_btn btn_red" /></li>
|
||||
<li><i class="tit"> </i><span id="LabErr"></span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div th:replace="common/footer :: footer">
|
||||
</div>
|
||||
<div th:replace="common/js :: js"></div>
|
||||
<script type="text/javascript">
|
||||
//查询用户信息
|
||||
$.ajax({
|
||||
type: "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>
|
150
templates/green/html/user/setup.html
Normal file
150
templates/green/html/user/setup.html
Normal file
@ -0,0 +1,150 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head th:replace="common/header :: common_head(~{::title},~{},~{::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>
|
161
templates/green/html/user/userinfo.html
Normal file
161
templates/green/html/user/userinfo.html
Normal file
@ -0,0 +1,161 @@
|
||||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head 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">全部收藏 ></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>
|
Reference in New Issue
Block a user