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.
 
 
 
 

120 rivejä
5.4 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. </div>
  9. </div>
  10. <div class="layui-fluid">
  11. <div class="layui-card">
  12. <div id="layui-search" class="layui-form layui-form layui-card-header layuiadmin-card-header-auto"
  13. style="display: none">
  14. <div class="layui-form-item">
  15. <div id="layui-search-fields" class="layui-search-fields" style="display: inline-block">
  16. </div>
  17. <div id="layui-search-button" class="layui-inline">
  18. <button class="layui-btn layuiadmin-btn" lay-submit lay-filter="LAY-front-search">
  19. <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
  20. </button>
  21. </div>
  22. </div>
  23. </div>
  24. <div class="layui-card-body">
  25. <div style="padding-bottom: 10px;" id="layui-top-button">
  26. </div>
  27. <table id="LAY-curd-table" lay-filter="LAY-curd-table"></table>
  28. <script type="text/html" id="table-curd-list">
  29. </script>
  30. </div>
  31. </div>
  32. </div>
  33. <script type="text/html" id="novelStatus">
  34. <input type="checkbox" lay-skin="switch" lay-text="审核通过|未审核" lay-filter="table-switch"
  35. data-field="{{d.FIELD}}" value="{{d.id}}" {{d.VALUE== 1 ? 'checked' : '' }} {{d.VALUE>1?'disabled':''}}>
  36. </script>
  37. <script type="text/html" id="novelName">
  38. <a target="_blank" href="/novel/novel/index?novelid={{d.id}}" title="{{d.intro}}">{{d.is_sensitive_words?'<span
  39. style="color:red">(含有敏感词)</span> ':''}}{{d.VALUE}}</a>
  40. </script>
  41. <script type="text/html" id="chapterName">
  42. {{#if(parseInt(d.last_id)){}}
  43. <a target="_blank" href="/novel/chapter/read?novelid={{d.id}}&chapterid={{d.last_id}}&siteid={{d.source_id}}">{{d.VALUE}}</a>
  44. {{#}else{}}
  45. {{d.VALUE}}
  46. {{#}}}
  47. </script>
  48. <script>
  49. var config;
  50. layui.admin.req({
  51. url: '/manage/content/novel/extra.json',
  52. method: 'POST',
  53. success: function (res) {
  54. config = {
  55. api: {
  56. batch: '/manage/content/novel/batch.json',
  57. list: '/manage/content/novel/list.json?source_id=0',
  58. del: '/manage/content/novel/del.json',
  59. change: '/manage/content/novel/change.json',
  60. clear: '/manage/content/novel/clear.json'
  61. },
  62. search: {
  63. name: {type: 'text', text: '书名'},
  64. author_id: {type: 'text', text: '作者', search: false},
  65. category_id: {type: 'select', text: '分类', data: res.data.category, search: true},
  66. status: {type: 'select', text: '状态', data: {0: '未审核', 1: '审核通过'}, search: true},
  67. },
  68. topButton: {
  69. del: {},
  70. },
  71. actionButton: {
  72. charge: {
  73. text: '收费设置',
  74. icon: 'layui-icon layui-icon-rmb',
  75. action: function (obj) {
  76. location.hash = '/novel/id=' + obj.data.id + '/charge';
  77. }
  78. },
  79. chapter: {
  80. text: '章节管理', icon: 'layui-icon layui-icon-list',
  81. action: function (obj) {
  82. if (obj.data.source_id) {
  83. layer.msg('非原创书籍');
  84. return false;
  85. }
  86. location.hash = '/novel/id=' + obj.data.id + '/chapter';
  87. }
  88. },
  89. edit: {
  90. action: function (obj) {
  91. location.hash = '/novel/edit/id=' + obj.data.id;
  92. }
  93. },
  94. del: {},
  95. },
  96. table: {
  97. page: true,
  98. limit: 30,
  99. cols: [[
  100. {type: 'checkbox', fixed: 'left'},
  101. {field: 'id', title: 'ID', align: 'center', width: 60},
  102. {field: 'cover', title: '封面', align: 'center', templet: '#table-img', width: 60,},
  103. {field: 'name', title: '书名(简介)', templet: '#novelName'},
  104. {field: 'category_name', title: '分类', width: 60},
  105. {field: 'author_name', title: '作者', width: 120},
  106. {field: 'last_name', title: '最新章节', templet: '#chapterName'},
  107. {field: 'last_update', title: '修改时间', align: 'center', templet: '#datetimeTpl'},
  108. {field: 'is_over', title: '全本', align: 'center', width: 80},
  109. {field: 'status', title: '状态', templet: '#novelStatus', align: 'center', width: 120,},
  110. {title: '操作', width: 320, align: 'center', fixed: 'right', toolbar: '#table-curd-list'}
  111. ]]
  112. }
  113. };
  114. layui.use('curd/list', layui.factory('curd/list'));
  115. }
  116. });
  117. </script>