You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

112 regels
5.0 KiB

  1. <title>章节审核列表</title>
  2. <div class="layui-card layadmin-header">
  3. <div class="layui-breadcrumb" lay-filter="breadcrumb">
  4. <a lay-href="">主页</a>
  5. <a><cite>书籍管理</cite></a>
  6. <a><cite>原创专区</cite></a>
  7. <a><cite>章节审核</cite></a>
  8. <a><cite>章节审核列表</cite></a>
  9. </div>
  10. </div>
  11. <div class="layui-fluid">
  12. <div class="layui-card">
  13. <div id="layui-search" class="layui-form layui-form layui-card-header layuiadmin-card-header-auto"
  14. style="display: none">
  15. <div class="layui-form-item">
  16. <div id="layui-search-fields" class="layui-search-fields" style="display: inline-block">
  17. </div>
  18. <div id="layui-search-button" class="layui-inline">
  19. <button class="layui-btn layuiadmin-btn" lay-submit lay-filter="LAY-front-search">
  20. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  21. </button>
  22. </div>
  23. </div>
  24. </div>
  25. <div class="layui-card-body">
  26. <div style="padding-bottom: 10px;" id="layui-top-button">
  27. </div>
  28. <table id="LAY-curd-table" lay-filter="LAY-curd-table"></table>
  29. <script type="text/html" id="table-curd-list">
  30. </script>
  31. </div>
  32. </div>
  33. </div>
  34. <script>
  35. var config = {
  36. api: {
  37. list: '/manage/content/chapter/list.json',
  38. audit: '/manage/content/chapter/audit.json',
  39. content: '/manage/content/chapter/content.json'
  40. },
  41. actionButton: {
  42. info: {
  43. text: '详情', style: 'layui-btn-normal', icon: 'layui-icon layui-icon-form', action: function (obj) {
  44. layui.admin.req({
  45. url: config.api.content,
  46. data: {novelid: obj.data.novel_id, chapterid: obj.data.id},
  47. method: 'post',
  48. success: function (res) {
  49. layui.layer.open({
  50. type: 1,
  51. skin: 'layui-layer-rim',
  52. area: ['100%', '100%'],
  53. btn: '关闭',
  54. title: obj.data.name,
  55. content: '<style>.chapter_preview p{text-indent: 2em;margin-bottom: 5px;font-size: 16px;line-height: 32px}</style><table class="layui-table chapter_preview"></table>',
  56. success: function (layero, index) {
  57. var table = layero.find('.layui-layer-content table');
  58. table.append('<tr><td>' + res.data.content + '</td></tr>');
  59. table.append('<tr style="background-color:#f2f2f2;"><th style="text-align: center">作者附笔</th></tr>');
  60. table.append('<tr><td>' + res.data.postscript + '</td></tr>');
  61. }
  62. });
  63. }
  64. });
  65. }
  66. },
  67. pass: {
  68. text: '通过', icon: 'layui-icon layui-icon-auz', action: function (obj) {
  69. layui.admin.req({
  70. url: config.api.audit,
  71. data: {novelid: obj.data.novel_id, chapterid: obj.data.id, action: 'pass'},
  72. method: 'post',
  73. success: function (res) {
  74. obj.del();
  75. layui.layer.msg('操作成功');
  76. }
  77. });
  78. }
  79. },
  80. reject: {
  81. text: '拒绝', style: 'layui-btn-danger', icon: 'layui-icon layui-icon-tips', action: function (obj) {
  82. layui.admin.req({
  83. url: config.api.audit,
  84. data: {novelid: obj.data.novel_id, chapterid: obj.data.id, action: 'reject'},
  85. method: 'post',
  86. success: function (res) {
  87. obj.del();
  88. layui.layer.msg('操作成功');
  89. }
  90. });
  91. }
  92. }
  93. },
  94. table: {
  95. where: {user_id: 0},
  96. page: true,
  97. cols: [[
  98. {field: 'id', title: 'ID', align: 'center', width: 60},
  99. {field: 'order_id', title: '章节', width: 80},
  100. {field: 'author', title: '作者名称', width: 160},
  101. {field: 'novel', title: '书籍名称', width: 160},
  102. {field: 'name', title: '章节名称'},
  103. {field: 'words', title: '字数', width: 80},
  104. {title: '操作', width: 220, align: 'center', fixed: 'right', toolbar: '#table-curd-list'}
  105. ]]
  106. }
  107. };
  108. layui.use('curd/list', layui.factory('curd/list'));
  109. </script>