模版更新

This commit is contained in:
xiongxiaoyang 2024-05-28 09:42:27 +08:00
parent b0c249cdca
commit ea5c0e8bd1
32 changed files with 312 additions and 311 deletions

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <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 class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <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> <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>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -62,7 +65,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -120,24 +122,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/author/listIncomeMonthByPage", url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeMonth+"</td>\n" + " " + book.incomeMonth + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.preTaxIncome/100+"</td>\n" + + book.preTaxIncome / 100 + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.afterTaxIncome/100+"\n" + " " + book.afterTaxIncome / 100 + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+ " <td class=\"goread\">" + (book.payStatus == 1 ? '已支付' : '待支付') +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -176,9 +178,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -191,12 +193,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -206,9 +208,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -219,9 +221,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head> <head>
@ -7,14 +7,15 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title> <title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/> <link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" /> <link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
<div class="header"> <div class="header">
<div class="mainNav" id="mainNav"> <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 class="box_center cf"
style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理 小说精品屋作家管理
@ -37,7 +38,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <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> <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>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -61,7 +64,6 @@
<tbody id="bookList"> <tbody id="bookList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -117,9 +119,9 @@
function search(curr, limit) { function search(curr, limit) {
var data = {'curr':curr,'limit':limit}; var data = {'curr': curr, 'limit': limit};
if(bookId){ if (bookId) {
data.bookId = bookId; data.bookId = bookId;
} }
@ -133,17 +135,17 @@
var bookList = data.data.list; var bookList = data.data.list;
if (bookList.length > 0) { if (bookList.length > 0) {
var bookListHtml = ""; var bookListHtml = "";
for(var i=0;i<bookList.length;i++){ for (var i = 0; i < bookList.length; i++) {
var book = bookList[i]; var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" + bookListHtml += (" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeDate+"</td>\n" + " " + book.incomeDate + "</td>\n" +
" <td class=\"goread\" >" " <td class=\"goread\" >"
+book.incomeAccount+"</td>\n" + + book.incomeAccount + "</td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
" "+book.incomeCount+"\n" + " " + book.incomeCount + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">"+book.incomeNumber+ " <td class=\"goread\">" + book.incomeNumber +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
@ -182,9 +184,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -197,12 +199,12 @@
} }
function updateBookStatus(bookId,status) { function updateBookStatus(bookId, status) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/author/updateBookStatus", url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0}, data: {'bookId': bookId, 'status': status == 0 ? 1 : 0},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -212,9 +214,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }
@ -225,9 +227,6 @@
}) })
} }
</script> </script>
</html> </html>

View File

@ -231,7 +231,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -261,7 +261,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -213,7 +213,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -300,7 +300,7 @@
layer.close(index); layer.close(index);
$.ajax({ $.ajax({
type: "delete", type: "delete",
url: "/author/deleteIndex/"+indexId, url: "/author/deleteIndex/" + indexId,
data: {}, data: {},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
@ -311,7 +311,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -380,7 +380,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -2,10 +2,10 @@
<div class="box_center cf"> <div class="box_center cf">
<div class="copyright"> <div class="copyright">
<ul> <ul>
<li class="menu"><a href="/?to=mobile">手机站</a><i class="line">|</i><a href="/">网站首页</a><i <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 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="/author/index.html">作家专区</a><!--<i class="line">|</i><a
href="/mobile/fiction_house.apk">客户端</a></li> href="/mobile/fiction_house.apk">客户端</a>--></li>
<li th:text="'Copyright (C) '+${application.website.domain}+' All rights reserved&nbsp;&nbsp;'+${application.website.name}+'版权所有'"></li> <li th:text="'Copyright (C) '+${application.website.domain}+' All rights reserved&nbsp;&nbsp;'+${application.website.name}+'版权所有'"></li>
</ul> </ul>

View File

@ -161,11 +161,6 @@
text-align: center; text-align: center;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
@ -320,8 +315,6 @@
} }
}) })
$("#content").css("min-height", ($(window).height() - 60) + "px");
})(); })();
@ -372,7 +365,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {

View File

@ -274,7 +274,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -289,8 +289,6 @@
} }
$("#content").css("min-height", ($(window).height() - 60) + "px");
function downloadFile() { function downloadFile() {
var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val(); var fileUrl = '/book/download?bookId=' + $("#bookIdHidden").val() + '&bookName=' + $("#bookNamedHidden").val();
window.location.href = fileUrl; window.location.href = fileUrl;

View File

@ -36,41 +36,43 @@
</div> </div>
</head> </head>
<body> <body>
<div id="content"> <div id="content">
<input type="hidden" id="bookIdHidden" th:value="${book.id}"/> <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="height: 50px;line-height: 50px;text-align: center"
class="layui-header header header-doc layui-bg-cyan">
<div style="float: left;margin-left: 10px"> <div style="float: left;margin-left: 10px">
<a href="javascript:history.go(-1)"> <a href="javascript:history.go(-1)">
<i style="font-size: 20px;color: #fff;" class="layui-icon">&#xe65c;</i></a> <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> </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"> <p style="height: 30px;line-height: 30px;padding: 10px">
<a href="#buttom" style="color: red">&nbsp;&nbsp;直达页面底部</a> <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> </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}">
</div> </a>
</p>
</div>
</div> </div>
<div th:replace="mobile/common/footer :: footer"> <div th:replace="mobile/common/footer :: footer">
</div> </div>
@ -80,13 +82,14 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script> <script>
$("#content").css("min-height",($(window).height()-60)+"px"); $.get("/book/addVisit", {"bookId": $("#bookIdHidden").val()}, function () {
$.get("/book/addVisit",{"bookId":$("#bookIdHidden").val()},function(){}); });
function toMyCollect(){
function toMyCollect() {
var token = localStorage.getItem("token"); var token = localStorage.getItem("token");
if(token) { if (token) {
window.location.href = "/book/search?token=" + token; window.location.href = "/book/search?token=" + token;
}else{ } else {
window.location.href = "/user/login.html"; window.location.href = "/user/login.html";
} }
} }

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>

View File

@ -1,6 +1,11 @@
<div th:fragment="css"> <div th:fragment="css">
<link rel="stylesheet" href="/mobile/layui/css/layui.css"> <link rel="stylesheet" href="/mobile/layui/css/layui.css">
<style type="text/css"> <style type="text/css">
body {
min-height: 100vh;
position: relative;
}
.app { .app {
display: none; display: none;
} }
@ -22,9 +27,12 @@
} }
#footer { #footer {
padding-top: 6px; position: absolute;
height: 60px; bottom: 0px;
line-height: 54px; left: 0;
right: 0;
height: 50px;
line-height: 48px;
text-align: center; text-align: center;
} }
</style> </style>

View File

@ -1,15 +1,19 @@
<div th:fragment="footer" id="footer" <div th:fragment="footer">
class="layui-footer footer footer-demo layui-bg-cyan"> <div style="height: 50px"></div>
<!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a> <div id="footer"
<a href="/mobile/book/searchSoftBook.html?catId=9" style="font-size: 14px;color: #fff;margin-left: 8px">漫画</a>--> class="layui-footer footer footer-demo layui-bg-cyan">
<a href="/?to=pc" style="font-size: 14px;color: #fff;margin-left: 8px">电脑站</a> <!--<a href="/mobile/book/searchSoftBook.html" style="font-size: 14px;color: #fff;">轻小说</a>
<a href="/user/read_history.html" style="font-size: 14px;color: #fff;margin-left: 8px">阅读记录</a> <a href="/mobile/book/searchSoftBook.html?catId=9" 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="/?to=pc" 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="/" style="font-size: 16px;color: #fff;">首页</a>
<!--<a href="https://www.zinglizingli.xyz/me/index.html" style="font-size: 14px;color: #fff;margin-left: 8px">开发者</a>--> <a href="/user/read_history.html" style="font-size: 16px;color: #fff;margin-left: 18px">阅读记录</a>
<a href="/user/favorites.html" style="font-size: 16px;color: #fff;margin-left: 18px">书架</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" <div style="margin-top:-3px;float: right"><a href="#top"><i class="layui-icon"
style="margin-right:15px;font-size: 30px;color:#fff ">&#xe604;</i></a> style="margin-right:15px;font-size: 25px;color:#fff ">&#xe604;</i></a>
</div>
</div> </div>
</div> </div>

View File

@ -79,11 +79,6 @@
padding-bottom: 20px; padding-bottom: 20px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -170,7 +165,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -190,7 +184,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -63,7 +63,6 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height", ($(window).height() - 140) + "px")
if (localStorage.getItem("autoLogin") == 1) { if (localStorage.getItem("autoLogin") == 1) {
$("#autoLogin").prop("checked", 'true'); $("#autoLogin").prop("checked", 'true');
layui.form.render('checkbox', 'loginForm'); layui.form.render('checkbox', 'loginForm');

View File

@ -62,10 +62,6 @@
height: 180px; height: 180px;
} }
#footer {
padding-top: 10px;
line-height: 43px;
}
</style> </style>
</head> </head>
<body> <body>
@ -113,7 +109,6 @@
<div th:replace="mobile/common/js :: js"></div> <div th:replace="mobile/common/js :: js"></div>
<script> <script>
$("#body").css("min-height", ($(window).height() - 110) + "px")
search(1, 20); search(1, 20);

View File

@ -69,7 +69,6 @@
<div th:replace="mobile/common/js :: js"> <div th:replace="mobile/common/js :: js">
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
$("#form1").css("min-height", ($(window).height() - 140) + "px")
$("#chkd").click(); $("#chkd").click();
$("#btnRegister").click(function () { $("#btnRegister").click(function () {

View File

@ -213,7 +213,6 @@
<script> <script>
$("#body").css("min-height", ($(window).height() - 60) + "px")
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
@ -244,7 +243,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'充值_'+${application.website.name}"></title> <title th:text="'充值_'+${application.website.name}"></title>
@ -20,39 +19,51 @@
<div class="payBox cf"> <div class="payBox cf">
<div class="payHead cf"> <div class="payHead cf">
<div class="fl"> <div class="fl">
充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币<!--<em class="red">+0</em>代金券--> 充值账号<span class="user_name" id="my_name"></span>余额:<em class="red" id="accountBalance">0</em>屋币
<!--<em class="red">+0</em>代金券-->
</div> </div>
</div> </div>
<div class="payCon"> <div class="payCon">
<h5>选择充值方式</h5> <h5>选择充值方式</h5>
<ul class="pay_way cf" id="ulPayType"> <ul class="pay_way cf" id="ulPayType">
<li class="on" valp="1"><img class="pay_pic" src="../images/pay_zfb.png" alt="支付宝支付" /></li> <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> <li valp="2"><img class="pay_pic" src="../images/pay_wx.png" alt="微信支付"/></li>
</ul> </ul>
<h5>选择充值金额</h5> <h5>选择充值金额</h5>
<ul class="pay_way cf" id="ulZFWX"> <ul class="pay_way cf" id="ulZFWX">
<li vals="10"><strong>10元</strong><span class="pay_mn">1000屋币</span></li> <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="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="50"><strong>50元</strong><span class="pay_mn">5000屋币
<li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币<!--<em class="red">+ 送1200代金券</em>--></span></li> <!--<em class="red">+ 送500代金券</em>--></span></li>
<li vals="200"><strong>200元</strong><span class="pay_mn">20000屋币<!--<em class="red">+ 送3000代金券</em>--></span></li> <li vals="100"><strong>100元</strong><span class="pay_mn">10000屋币
<li vals="500"><strong>500元</strong><span class="pay_mn">50000屋币<!--<em class="red">+ 送10000代金券</em>--></span></li> <!--<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>
<ul class="pay_way cf" style="display:none;" id="ulPayPal"> <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="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="50" class="on"><strong>50美元</strong><span class="pay_mn">25000屋币<em class="red"></em></span>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span></li> </li>
<li vals="100"><strong>100美元</strong><span class="pay_mn">50000屋币<em class="red"></em></span>
</li>
</ul> </ul>
<ul class="pay_Checkout" id="ulZFWXXJ"> <ul class="pay_Checkout" id="ulZFWXXJ">
<li>当前汇率1元=100屋币</li> <li>当前汇率1元=100屋币</li>
<li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币<!--+500代金券--></em></li> <li>总计金额<em class="red" id="showTotal">¥50元</em> 获得 <em class="red" id="showRemark">5000屋币
<li style="display:none"><a class="btn_red" href="pay_success.html" onclick="javascript:UserPay.sendPay();">立即支付</a></li> <!--+500代金券--></em></li>
<li style="display:none"><a class="btn_red" href="pay_success.html"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
<ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ"> <ul class="pay_Checkout" style="display:none;" id="ulPayPalXJ">
<li>当前汇率1美元=500屋币</li> <li>当前汇率1美元=500屋币</li>
<li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red" id="showPayPalRemark">25000屋币</em></li> <li>总计金额<em class="red" id="showPayPalTotal">50美元</em> 获得 <em class="red"
<li style="display:none"><a class="btn_red" href="javascript:void(0);" onclick="javascript:UserPay.sendPay();">立即支付</a></li> id="showPayPalRemark">25000屋币</em>
</li>
<li style="display:none"><a class="btn_red" href="javascript:void(0);"
onclick="javascript:UserPay.sendPay();">立即支付</a></li>
</ul> </ul>
</div> </div>
<div class="payFoot"> <div class="payFoot">
@ -68,7 +79,7 @@
</div> </div>
</div> </div>
<input type="hidden" id="pValue" name="payAmount" /> <input type="hidden" id="pValue" name="payAmount"/>
</form> </form>
@ -80,7 +91,6 @@
<script type="text/javascript"> <script type="text/javascript">
//查询用户信息 //查询用户信息
$.ajax({ $.ajax({
type: "get", type: "get",
@ -89,9 +99,9 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -99,7 +109,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,9 +125,9 @@
var payType = $("#ulPayType").find("li.on").attr("valp"); var payType = $("#ulPayType").find("li.on").attr("valp");
if(payType == 2){ if (payType == 2) {
layer.alert("微信支付暂未开通,敬请期待"); layer.alert("微信支付暂未开通,敬请期待");
return ; return;
} }
$("#pValue").val($(this).attr("vals")); $("#pValue").val($(this).attr("vals"));
@ -125,9 +135,6 @@
$("#payform").submit(); $("#payform").submit();
}); });
</script> </script>

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的书评_'+${application.website.name}"></title> <title th:text="'我的书评_'+${application.website.name}"></title>
@ -54,24 +55,24 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listCommentByPage", url: "/user/listCommentByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var commentList = data.data.list; var commentList = data.data.list;
if (commentList.length > 0) { if (commentList.length > 0) {
$("#bookCommentTotal").html("("+data.data.total+"条)"); $("#bookCommentTotal").html("(" + data.data.total + "条)");
var commentListHtml = ""; var commentListHtml = "";
for (var i = 0; i < commentList.length; i++) { for (var i = 0; i < commentList.length; i++) {
var comment = commentList[i]; var comment = commentList[i];
commentListHtml += ("<div class=\"comment_list cf\">" + commentListHtml += ("<div class=\"comment_list cf\">" +
"<div class=\"user_heads fl\" vals=\"389\">" + "<div class=\"user_heads fl\" vals=\"389\">" +
"<img src=\""+(comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png')+"\" class=\"user_head\" alt=\"\">" + "<img src=\"" + (comment.createUserPhoto ? comment.createUserPhoto : '/images/man.png') + "\" class=\"user_head\" alt=\"\">" +
"<span class=\"user_level1\" style=\"display: none;\">见习</span></div>" + "<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\">" + "<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+ comment.commentContent +
"</li><li class=\"other cf\">" + "</li><li class=\"other cf\">" +
"<span class=\"time fl\">"+comment.createTime+"</span>" + "<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 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>"); "</span></li>\t\t</ul>\t</div>");
} }
@ -109,9 +110,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,11 +1,13 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head> <head>
<head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{::meta},~{::link},~{})">
<title th:text="'我的书架_'+${application.website.name}"></title> <title th:text="'我的书架_'+${application.website.name}"></title>
<meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}" /> <meta name="keywords" th:content="'我的书架,个人中心,'+${application.website.name}+'小说,'+${application.website.name}"/>
<meta name="description" th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'" /> <meta name="description"
<link rel="stylesheet" href="/css/user.css" /> th:content="${application.website.name}+'小说每日更新小说连载,小说排行榜,提供言情小说,都市小说,玄幻小说,穿越小说,青春小说,总裁豪门小说,网络小说,免费小说,全本小说,首发小说,最新章节免费小说阅读,精彩尽在'+${application.website.name}+'小说!'"/>
<link rel="stylesheet" href="/css/user.css"/>
</head> </head>
</head> </head>
<body class=""> <body class="">
@ -29,7 +31,9 @@
<div class="my_r"> <div class="my_r">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <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> <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>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
@ -56,7 +60,6 @@
<tbody id="bookShelfList"> <tbody id="bookShelfList">
</tbody> </tbody>
</table> </table>
<div class="pageBox cf" id="shellPage"> <div class="pageBox cf" id="shellPage">
@ -82,31 +85,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookShelfList = data.data.list; var bookShelfList = data.data.list;
if (bookShelfList.length > 0) { if (bookShelfList.length > 0) {
var bookShelfListHtml = ""; var bookShelfListHtml = "";
for(var i=0;i<bookShelfList.length;i++){ for (var i = 0; i < bookShelfList.length; i++) {
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -144,9 +147,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -74,7 +74,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'我的反馈_'+${application.website.name}"></title> <title th:text="'我的反馈_'+${application.website.name}"></title>
@ -34,8 +33,6 @@
<dd id="feedbackList"> <dd id="feedbackList">
</dd> </dd>
</dl> </dl>
<div class="cf"> <div class="cf">
@ -61,7 +58,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listUserFeedBackByPage", url: "/user/listUserFeedBackByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -71,8 +68,8 @@
for (var i = 0; i < feedbackList.length; i++) { for (var i = 0; i < feedbackList.length; i++) {
var feedback = feedbackList[i]; var feedback = feedbackList[i];
feedbackListHtml += (" <div class=\"comment_list clear\" ><ul>\n" + 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_1\"><span class=\"user_name fl\"></span><span class=\"time fl\">" + feedback.createTime + "</span></li>\n" +
" <li class=\"li_2\">"+feedback.content+"</li>\n" + " <li class=\"li_2\">" + feedback.content + "</li>\n" +
" </ul></div>"); " </ul></div>");
} }
$("#feedbackList").html(feedbackListHtml); $("#feedbackList").html(feedbackListHtml);
@ -109,9 +106,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'最近阅读_'+${application.website.name}"></title> <title th:text="'最近阅读_'+${application.website.name}"></title>
@ -13,7 +14,9 @@
<div class="viewhistoryBox"> <div class="viewhistoryBox">
<div class="my_bookshelf"> <div class="my_bookshelf">
<div class="title cf"> <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> <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>
<div id="divData" class="updateTable"> <div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0"> <table cellpadding="0" cellspacing="0">
@ -69,31 +72,31 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listReadHistoryByPage", url: "/user/listReadHistoryByPage",
data: {'curr':curr,'limit':limit}, data: {'curr': curr, 'limit': limit},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
var bookHistoryList = data.data.list; var bookHistoryList = data.data.list;
if (bookHistoryList.length > 0) { if (bookHistoryList.length > 0) {
var bookHistoryListHtml = ""; var bookHistoryListHtml = "";
for(var i=0;i<bookHistoryList.length;i++){ for (var i = 0; i < bookHistoryList.length; i++) {
var book = bookHistoryList[i]; var book = bookHistoryList[i];
bookHistoryListHtml+=(" <tr class=\"book_list\" vals=\"291\">\n" + bookHistoryListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >["+book.catName+"]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/"+book.bookId+".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +
" "+book.bookName+"</a>\n" + " " + book.bookName + "</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"chapter\" valsc=\"291|2037554|1\">\n" + " <td class=\"chapter\" valsc=\"291|2037554|1\">\n" +
"<a href='/book/"+book.bookId+"/"+book.lastIndexId+".html'>"+book.lastIndexName+"</a>"+ "<a href='/book/" + book.bookId + "/" + book.lastIndexId + ".html'>" + book.lastIndexName + "</a>" +
" </td>\n" + " </td>\n" +
" <td class=\"time\">\n" + " <td class=\"time\">\n" +
" "+book.lastIndexUpdateTime+"\n" + " " + book.lastIndexUpdateTime + "\n" +
" </td>\n" + " </td>\n" +
" <td class=\"goread\">\n" + " <td class=\"goread\">\n" +
"<a href='/book/"+book.bookId+"/"+book.preContentId+".html'>继续阅读</a>"+ "<a href='/book/" + book.bookId + "/" + book.preContentId + ".html'>继续阅读</a>" +
" </td>\n" + " </td>\n" +
" </tr>"); " </tr>");
} }
@ -131,9 +134,9 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
}else { } else {
layer.alert(data.msg); layer.alert(data.msg);
} }

View File

@ -61,7 +61,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +96,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改密码_'+${application.website.name}"></title> <title th:text="'修改密码_'+${application.website.name}"></title>
@ -24,13 +25,18 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <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="oldPass" type="password" id="txtOldPass" class="s_input"
<li><i class="tit">&nbsp;</i><input name="txtNewPass1" type="password" id="txtNewPass1" class="s_input" placeholder="请输入新密码" /></li> 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 name="txtNewPass1" type="password" id="txtNewPass1"
<li><i class="tit">&nbsp;</i><input type="submit" name="btnExchangePassword" value="修改" id="btnExchangePassword" onclick="updatePassword()" class="s_btn btn_red" /></li> class="s_input" placeholder="请输入新密码"/></li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> <li><i class="tit">&nbsp;</i><input name="txtNewPass2" type="password" id="txtNewPass2"
</ul> 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>
@ -57,14 +63,14 @@
$("#LabErr").html("确认密码不能为空!"); $("#LabErr").html("确认密码不能为空!");
return; return;
} }
if(newPassword1 !== newPassword2){ if (newPassword1 !== newPassword2) {
$("#LabErr").html("两次输入的新密码不匹配!"); $("#LabErr").html("两次输入的新密码不匹配!");
return; return;
} }
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updatePassword", url: "/user/updatePassword",
data: {'oldPassword':oldPassword,'newPassword1':newPassword1,'newPassword2':newPassword2}, data: {'oldPassword': oldPassword, 'newPassword1': newPassword1, 'newPassword2': newPassword2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -72,7 +78,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
$("#LabErr").html(data.msg); $("#LabErr").html(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'修改性别_'+${application.website.name}"></title> <title th:text="'修改性别_'+${application.website.name}"></title>
@ -24,14 +25,16 @@
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li><i class="tit">我的性别</i> <li><i class="tit">我的性别</i>
<label><input type="radio" name="sex" value="0" />&nbsp;男生</label> <label><input type="radio" name="sex" value="0"/>&nbsp;男生</label>
<label><input class="ml20" type="radio" name="sex" value="1" checked />&nbsp;女生</label> <label><input class="ml20" type="radio" name="sex" value="1" checked/>&nbsp;女生</label>
</li> </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 class="mt20"><i class="tit">&nbsp;</i><input type="button" onclick="updateSex()" name="btn"
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li> value="修改" id="btn" class="s_btn btn_red"/>
</ul> </li>
<li><i class="tit">&nbsp;</i><span id="LabErr"></span></li>
</ul>
</div> </div>
</div> </div>
</div> </div>
@ -50,15 +53,14 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("input[name=sex]").eq(0).attr("checked",true); $("input[name=sex]").eq(0).attr("checked", true);
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -69,11 +71,12 @@
layer.alert('网络异常'); layer.alert('网络异常');
} }
}) })
function updateSex() { function updateSex() {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/updateUserInfo", url: "/user/updateUserInfo",
data: {'userSex':$("input[name=sex]:checked").val()}, data: {'userSex': $("input[name=sex]:checked").val()},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -81,7 +84,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);

View File

@ -1,4 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'账号设置_'+${application.website.name}"></title> <title th:text="'账号设置_'+${application.website.name}"></title>
@ -25,10 +26,12 @@
<div class="my_info cf"> <div class="my_info cf">
<div class="my_info_txt"> <div class="my_info_txt">
<ul class="mytab_list"> <ul class="mytab_list">
<li ><i class="tit">我的头像</i> <li><i class="tit">我的头像</i>
<a style="position: relative" > <a style="position: relative">
<img id="imgLogo" class="user_img" alt="我的头像" src="/images/man.png" /> <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; "/> <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> </a>
@ -59,27 +62,26 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.nickName + "<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_name").html(data.data.username+"<em class=\"ml10\">[修改]</em>"); $("#my_name").html(data.data.username + "<em class=\"ml10\">[修改]</em>");
} }
if(data.data.userSex === '0'){ if (data.data.userSex === '0') {
$("#my_sex").html("男<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("男<em class=\"ml10\">[修改]</em>");
}else if(data.data.userSex === '1'){ } else if (data.data.userSex === '1') {
$("#my_sex").html("女<em class=\"ml10\">[修改]</em>"); $("#my_sex").html("女<em class=\"ml10\">[修改]</em>");
}else{ } else {
$("#my_sex").html("请选择"); $("#my_sex").html("请选择");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -96,7 +98,7 @@
var file = $("#file0").val(); //文件名称 var file = $("#file0").val(); //文件名称
if (file != "") { if (file != "") {
if(checkPicUpload($("#file0")[0])) { if (checkPicUpload($("#file0")[0])) {
$.ajaxFileUpload({ $.ajaxFileUpload({
url: "/file/picUpload", //用于文件上传的服务器端请求地址 url: "/file/picUpload", //用于文件上传的服务器端请求地址
@ -118,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -143,7 +145,6 @@
} }
} }
</script> </script>
</body> </body>

View File

@ -1,6 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!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"> <html xmlns="http://www.w3.org/1999/xhtml">
<head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})"> <head th:replace="common/header :: common_head(~{::title},~{},~{::link},~{})">
<title th:text="'个人中心_'+${application.website.name}"></title> <title th:text="'个人中心_'+${application.website.name}"></title>
@ -25,12 +24,14 @@
</div> </div>
<div class="my_r"> <div class="my_r">
<div class="my_info cf"> <div class="my_info cf">
<img id="imgLogo" class="user_big_head" src="/images/man.png" /> <img id="imgLogo" class="user_big_head" src="/images/man.png"/>
<div class="my_info_txt"> <div class="my_info_txt">
<p class="my_name" id="my_name"> <p class="my_name" id="my_name">
</p> </p>
<ul class="my_list"> <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_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> <li class="my_baonian"></li>
</ul> </ul>
@ -87,12 +88,12 @@
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
if(data.data.userPhoto){ if (data.data.userPhoto) {
$("#imgLogo").attr("src",data.data.userPhoto); $("#imgLogo").attr("src", data.data.userPhoto);
} }
if(data.data.nickName){ if (data.data.nickName) {
$("#my_name").html(data.data.nickName); $("#my_name").html(data.data.nickName);
}else{ } else {
$("#my_name").html(data.data.username); $("#my_name").html(data.data.username);
} }
@ -100,7 +101,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -115,7 +116,7 @@
$.ajax({ $.ajax({
type: "get", type: "get",
url: "/user/listBookShelfByPage", url: "/user/listBookShelfByPage",
data: {'limit':2}, data: {'limit': 2},
dataType: "json", dataType: "json",
success: function (data) { success: function (data) {
if (data.code == 200) { if (data.code == 200) {
@ -126,7 +127,7 @@
var book = bookShelfList[i]; var book = bookShelfList[i];
bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" + bookShelfListHtml += (" <tr class=\"book_list\" vals=\"291\">\n" +
" <td class=\"style bookclass\">\n" + " <td class=\"style bookclass\">\n" +
" <a href=\"/book/bookclass.html?c="+book.catId+"\" >[" + book.catName + "]</a>\n" + " <a href=\"/book/bookclass.html?c=" + book.catId + "\" >[" + book.catName + "]</a>\n" +
" </td>\n" + " </td>\n" +
" <td class=\"name\">\n" + " <td class=\"name\">\n" +
" <a href=\"/book/" + book.bookId + ".html\">\n" + " <a href=\"/book/" + book.bookId + ".html\">\n" +

View File

@ -27,15 +27,14 @@
if (layerStatus == 1) { if (layerStatus == 1) {
$("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>"); $("#cFavs").html("<a class=\"ico_shelf\" href=\"javascript:void(0);\"><b>已收藏</b></a>");
jQuery.cookie("u-faorites", "1"); jQuery.cookie("u-faorites", "1");
} } else {
else {
$("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>"); $("#cFavs").html("<a class=\"btn_ora_white btn_addsj\" href=\"javascript:void(0);\">已在书架</a>");
} }
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -91,7 +90,7 @@
} }
}, },
SaveComment: function (cmtBId, cmtCId, cmtDetail) { SaveComment: function (cmtBId, cmtCId, cmtDetail) {
if(!isLogin){ if (!isLogin) {
layer.alert('请先登陆'); layer.alert('请先登陆');
return; return;
} }
@ -121,7 +120,7 @@
} else if (data.code == 1001) { } else if (data.code == 1001) {
//未登录 //未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} else { } else {
layer.alert(data.msg); layer.alert(data.msg);
@ -187,7 +186,7 @@
localStorage.setItem("fonts", fonts); localStorage.setItem("fonts", fonts);
$(".readBox").css("font-size", fonts + "px"); $(".readBox").css("font-size", fonts + "px");
$("#cFonts").html(fonts); $("#cFonts").html(fonts);
$("#ChapterBody").attr("class","article-content font"+fonts); $("#ChapterBody").attr("class", "article-content font" + fonts);
BookDetail.reShowCover(); BookDetail.reShowCover();
}, },
SetBackUpColor: function (colorNum) { SetBackUpColor: function (colorNum) {

View File

@ -1,10 +1,11 @@
var needLoginPath = ['/user/favorites.html','/user/comment.html','/user/feedback.html', var needLoginPath = ['/user/favorites.html', '/user/comment.html', '/user/feedback.html',
'/user/feedback_list.html','/user/read_history.html','/user/set_name.html', '/user/feedback_list.html', '/user/read_history.html', '/user/set_name.html',
'/user/set_password.html','/user/set_sex.html','/user/setup.html','/user/userinfo.html', '/user/set_password.html', '/user/set_sex.html', '/user/setup.html', '/user/userinfo.html',
"/pay/index.html," + "/pay/index.html," +
"/author/register.html","/author/index.html"]; "/author/register.html", "/author/index.html"];
var isLogin = false; var isLogin = false;
var url = window.location.search; var url = window.location.search;
//key(需要检索的键 //key(需要检索的键
function getSearchString(key) { function getSearchString(key) {
var str = url; var str = url;
@ -14,26 +15,28 @@ function getSearchString(key) {
for (var i = 0; i < arr.length; i++) { for (var i = 0; i < arr.length; i++) {
var tmp_arr = arr[i].split("="); var tmp_arr = arr[i].split("=");
if(tmp_arr[0] == key){ if (tmp_arr[0] == key) {
return decodeURIComponent(tmp_arr[1]); return decodeURIComponent(tmp_arr[1]);
} }
} }
return undefined; return undefined;
} }
var keyword = getSearchString("k"); var keyword = getSearchString("k");
if(keyword != undefined) { if (keyword != undefined) {
$("#searchKey").val(keyword); $("#searchKey").val(keyword);
$("#workDirection").remove(); $("#workDirection").remove();
$("#idGirl").remove(); $("#idGirl").remove();
} }
function searchByK(k){ function searchByK(k) {
if(!k){ if (!k) {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(document.getElementById("searchKey").value) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(document.getElementById("searchKey").value)
}else{ } else {
window.location.href='/book/bookclass.html?k='+encodeURIComponent(k) window.location.href = '/book/bookclass.html?k=' + encodeURIComponent(k)
} }
} }
$("#searchKey").keypress(function (even) { $("#searchKey").keypress(function (even) {
if (even.which == 13) { if (even.which == 13) {
even.stopPropagation(); even.stopPropagation();
@ -50,37 +53,37 @@ Array.prototype.indexOf = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if(!token){ if (!token) {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl='+decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
}else{ } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "/user/refreshToken", url: "/user/refreshToken",
data: {}, data: {},
dataType: "json", dataType: "json",
success: function(data){ success: function (data) {
if(data.code == 200){ if (data.code == 200) {
$(".user_link").html("<i class=\"line mr20\">|</i>" + $(".user_link").html("<i class=\"line mr20\">|</i>" +
"<a href=\"/user/userinfo.html\" class=\"mr15\">"+data.data.nickName+"</a>" + "<a href=\"/user/userinfo.html\" class=\"mr15\">" + data.data.nickName + "</a>" +
"<a href=\"javascript:logout()\" >退出</a>"); "<a href=\"javascript:logout()\" >退出</a>");
; ;
if("/user/login.html" == window.location.pathname){ if ("/user/login.html" == window.location.pathname) {
var orginUrl = getSearchString("originUrl"); var orginUrl = getSearchString("originUrl");
window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl; window.location.href = orginUrl == undefined || orginUrl.isBlank() ? "/" : orginUrl;
return; return;
} }
isLogin = true; isLogin = true;
if(localStorage.getItem("autoLogin") == 1){ if (localStorage.getItem("autoLogin") == 1) {
$.cookie('Authorization', data.data.token, { expires: 7 ,path: '/' }); $.cookie('Authorization', data.data.token, {expires: 7, path: '/'});
}else { } else {
$.cookie('Authorization', data.data.token,{ path: '/' }); $.cookie('Authorization', data.data.token, {path: '/'});
} }
}else{ } else {
if(needLoginPath.indexOf(window.location.pathname) != -1){ if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html'; location.href = '/user/login.html';
} }
$(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>"); $(".user_link").html("<i class=\"line mr20\">|</i><a href=\"/user/login.html\" class=\"mr15\">登录</a><a href=\"/user/register.html\" >注册</a>");
@ -94,7 +97,6 @@ if(!token){
} }
String.prototype.isPhone = function () { String.prototype.isPhone = function () {
var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/; var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/;
if (strTemp.test(this)) { if (strTemp.test(this)) {
@ -104,7 +106,7 @@ String.prototype.isPhone = function () {
}; };
String.prototype.isBlank = function () { String.prototype.isBlank = function () {
if(this == null || $.trim(this) == ""){ if (this == null || $.trim(this) == "") {
return true; return true;
} }
return false; return false;
@ -118,11 +120,8 @@ String.prototype.isNickName = function () {
}; };
function logout() { function logout() {
$.cookie('Authorization', null,{ path: '/' }); $.cookie('Authorization', null, {path: '/'});
location.reload(); location.reload();
} }
@ -133,9 +132,9 @@ function isImg(str) {
//校验图片上传 //校验图片上传
function checkPicUpload(file){ function checkPicUpload(file) {
if(!isImg(file.value.substr(file.value.lastIndexOf(".")))){ if (!isImg(file.value.substr(file.value.lastIndexOf(".")))) {
layer.alert('只能上传图片格式的文件'); layer.alert('只能上传图片格式的文件');
return false; return false;
} }
@ -144,13 +143,13 @@ function checkPicUpload(file){
if (isIE && !file.files) { if (isIE && !file.files) {
var filePath = file.value; var filePath = file.value;
var fileSystem = new ActiveXObject("Scripting.FileSystemfileect"); var fileSystem = new ActiveXObject("Scripting.FileSystemfileect");
var file = fileSystem.GetFile (filePath); var file = fileSystem.GetFile(filePath);
fileSize = file.Size; fileSize = file.Size;
}else { } else {
fileSize = file.files[0].size; fileSize = file.files[0].size;
} }
fileSize=Math.round(fileSize/1024*100)/100; //单位为KB fileSize = Math.round(fileSize / 1024 * 100) / 100; //单位为KB
if(fileSize>=1024){ if (fileSize >= 1024) {
layer.alert('上传的图片大小不能超过1M'); layer.alert('上传的图片大小不能超过1M');
return false; return false;
} }

View File

@ -106,7 +106,7 @@ Array.prototype.remove = function (val) {
var token = $.cookie('Authorization'); var token = $.cookie('Authorization');
if (!token) { if (!token) {
if (needLoginPath.indexOf(window.location.pathname) != -1) { if (needLoginPath.indexOf(window.location.pathname) != -1) {
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href); location.href = '/user/login.html?originUrl=' + encodeURIComponent(location.href);
} }
// $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>"); // $(".user_link").html("<a href=\"/user/login.html\">登录</a><a href=\"/user/register.html\">注册</a>");