作家专区新增稿费收入查询(订阅明细+稿费汇总)

This commit is contained in:
xiongxiaoyang
2020-11-03 14:58:59 +08:00
parent fbfb68583f
commit 4cccea5d75
30 changed files with 2259 additions and 24 deletions

View File

@ -49,4 +49,11 @@ xss:
urlPatterns: /book/addBookComment,/user/addFeedBack,/author/addBook,/author/addBookContent,/author/register.html
author:
income:
#税率(扣税后所得比率)
tax-rate: 0.9
#分佣比例
share-proportion: 0.7
#兑换比率(人民币)
exchange-proportion: 0.01

View File

@ -0,0 +1,227 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" />
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_1" href="/author/index.html">小说管理</a></li>
<li><a class="link_1 on" href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html" class="red">稿费汇总</a></h2>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="goread">
月份
</th>
<th class="goread">
税前收入
</th>
<th class="goread">
税后收入
</th>
<th class="goread">
支付状态
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 10);
function search(curr, limit) {
$.ajax({
type: "POST",
url: "/author/listIncomeMonthByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
var bookListHtml = "";
for(var i=0;i<bookList.length;i++){
var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" +
" "+book.incomeMonth+"</td>\n" +
" <td class=\"goread\" >"
+book.preTaxIncome/100+"</td>\n" +
" <td class=\"goread\">\n" +
" "+book.afterTaxIncome/100+"\n" +
" </td>\n" +
" <td class=\"goread\">"+(book.payStatus == 1 ? '已支付' : '待支付')+
" </td>\n" +
" </tr>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'shellPage' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
}
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function updateBookStatus(bookId,status) {
$.ajax({
type: "POST",
url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -0,0 +1,225 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
<title>作家管理系统-小说精品屋</title>
<link rel="stylesheet" href="/css/base.css?v=1"/>
<link rel="stylesheet" href="/css/user.css" />
</head>
</head>
<body class="">
<div class="header">
<div class="mainNav" id="mainNav">
<div class="box_center cf" style="text-align: center;height: 44px;line-height: 48px;color: #fff;font-size: 16px;">
小说精品屋作家管理
</div>
</div>
</div>
<div class="main box_center cf">
<div class="userBox cf">
<div class="my_l">
<ul class="log_list">
<li><a class="link_1" href="/author/index.html">小说管理</a></li>
<li><a class="link_1 on" href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
<div class="my_r">
<div class="my_bookshelf">
<div class="title cf">
<h2 class="fl ml10"><a href="/author/author_income_detail.html" class="red">订阅明细</a></h2><i class="fl ml20 mr20 font16">|</i><h2 class="fl"><a href="/author/author_income.html">稿费汇总</a></h2>
</div>
<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="goread">
日期
</th>
<th class="goread">
订阅总额
</th>
<th class="goread">
订阅次数
</th>
<th class="goread">
订阅人数
</th>
</tr>
</thead>
<tbody id="bookList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>
<!--<div id="divData" class="updateTable">
<table cellpadding="0" cellspacing="0">
<thead>
<tr>
<th class="name">
爬虫源(已开启的爬虫源)
</th>
<th class="chapter">
成功爬取数量websocket实现
</th>
<th class="time">
目标爬取数量
</th>
<th class="goread">
状态(正在运行,已停止)(一次只能运行一个爬虫源)
</th>
<th class="goread">
操作(启动,停止)
</th>
</tr>
</thead>
<tbody id="bookShelfList">
</tbody>
</table>
<div class="pageBox cf" id="shellPage">
</div>
</div>-->
</div>
</div>
</div>
</div>
</body>
<script src="/javascript/jquery-1.8.0.min.js" type="text/javascript"></script>
<script src="/layui/layui.all.js" type="text/javascript"></script>
<script src="/javascript/header.js" type="text/javascript"></script>
<script src="/javascript/user.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
search(1, 10);
function search(curr, limit) {
$.ajax({
type: "POST",
url: "/author/listIncomeDailyByPage",
data: {'curr':curr,'limit':limit},
dataType: "json",
success: function (data) {
if (data.code == 200) {
var bookList = data.data.list;
if (bookList.length > 0) {
var bookListHtml = "";
for(var i=0;i<bookList.length;i++){
var book = bookList[i];
bookListHtml+=(" <tr class=\"book_list\" >\n" +
" <td class=\"goread\">\n" +
" "+book.incomeDate+"</td>\n" +
" <td class=\"goread\" >"
+book.incomeAccount+"</td>\n" +
" <td class=\"goread\">\n" +
" "+book.incomeCount+"\n" +
" </td>\n" +
" <td class=\"goread\">"+book.incomeNumber+
" </td>\n" +
" </tr>");
}
$("#bookList").html(bookListHtml);
layui.use('laypage', function () {
var laypage = layui.laypage;
//执行一个laypage实例
laypage.render({
elem: 'shellPage' //注意,这里的 test1 是 ID不用加 # 号
, count: data.data.total //数据总数,从服务端得到,
, curr: data.data.pageNum
, limit: data.data.pageSize
, jump: function (obj, first) {
//obj包含了当前分页的所有参数比如
console.log(obj.curr); //得到当前页,以便向服务端请求对应页的数据。
console.log(obj.limit); //得到每页显示的条数
//首次不执行
if (!first) {
search(obj.curr, obj.limit);
} else {
}
}
});
});
}
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
function updateBookStatus(bookId,status) {
$.ajax({
type: "POST",
url: "/author/updateBookStatus",
data: {'bookId':bookId,'status':status==0?1:0},
dataType: "json",
success: function (data) {
if (data.code == 200) {
location.reload();
} else if (data.code == 1001) {
//未登录
location.href = '/user/login.html?originUrl=' + decodeURIComponent(location.href);
}else {
layer.alert(data.msg);
}
},
error: function () {
layer.alert('网络异常');
}
})
}
</script>
</html>

View File

@ -32,8 +32,9 @@
<ul class="log_list">
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_1 " href="/author/author_income_detail.html">稿费收入</a></li>
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>

View File

@ -29,8 +29,9 @@
<ul class="log_list">
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_1 " href="/author/author_income_detail.html">稿费收入</a></li>
<!--<li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
</div>
@ -57,9 +58,11 @@
<li><span id="LabErr"></span></li>
<b>章节名:</b>
<li><input type="text" id="bookIndex" name="bookIndex" class="s_input" ></li>
<b>章节内容:</b>
<b>章节内容:</b><li id="contentLi">
<textarea name="bookContent" rows="30" cols="80" id="bookContent"
class="textarea"></textarea>
class="textarea"></textarea></li>
<li style="margin-top: 10px"><input type="button" onclick="addBookContent()" name="btnRegister" value="提交"
id="btnRegister" class="btn_red">
@ -115,6 +118,13 @@
<script language="javascript" type="text/javascript">
var bookStatus = getSearchString("bookStatus");
if(bookStatus == 1){
$("#contentLi").after("<b>是否收费</b>\n" +
" <li><input type=\"radio\" name=\"isVip\" value=\"0\" checked >免费\n" +
" <input type=\"radio\" name=\"isVip\" value=\"1\" >收费</li><br/>");
}
var lock = false;
function addBookContent() {
@ -143,12 +153,19 @@
}
var isVip = 0;
if(bookStatus == 1){
isVip = $("input:checked[name=isVip]").val();
}
$.ajax({
type: "POST",
url: "/author/addBookContent",
data: {'bookId':bookId,'indexName':indexName,'content':content},
data: {'bookId':bookId,'indexName':indexName,'content':content,'isVip':isVip},
dataType: "json",
success: function (data) {
if (data.code == 200) {

View File

@ -28,6 +28,7 @@
<ul class="log_list">
<li><a class="link_1 on" href="/author/index.html">小说管理</a></li>
<li><a class="link_1 " href="/author/author_income_detail.html">稿费收入</a></li>
<!-- <li><a class="link_1 " href="/user/userinfo.html">批量小说爬取</a></li>
<li><a class="link_4 " href="/user/favorites.html">单本小说爬取</a></li>-->
</ul>
@ -149,7 +150,7 @@
" <td class=\"goread\" id='opt"+book.id+"'>" +
"<a href='javascript:updateBookStatus(\""+book.id+"\","+book.status+")'>"+(book.status==0?'上架':'下架')+" </a>" +
"<a href='/author/content_add.html?bookId="+book.id+"'>发布章节 </a>" +
"<a href='/author/content_add.html?bookStatus="+book.status+"&bookId="+book.id+"'>发布章节 </a>" +
"</td> </tr>");
}
$("#bookList").html(bookListHtml);