Logs.html 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. <!DOCTYPE html>
  2. <html class="x-admin-sm">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="renderer" content="webkit">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
  8. <link rel="shortcut icon" href="https://osscold.baozhida.cn/favicon.ico">
  9. <link rel="bookmark" href="https://osscold.baozhida.cn/favicon.ico">
  10. <link rel="stylesheet" href="https://osscold.baozhida.cn/css/font.css">
  11. <link rel="stylesheet" href="https://osscold.baozhida.cn/css/xadmin.css">
  12. <script src="https://osscold.baozhida.cn/lib/layui/layui.js" charset="utf-8"></script>
  13. <script type="text/javascript" src="https://osscold.baozhida.cn/js/xadmin.js"></script>
  14. </head>
  15. <body>
  16. <div class="x-nav">
  17. <span class="layui-breadcrumb">
  18. <a href="">首页</a>
  19. <a><cite>宝智达</cite></a>
  20. </span>
  21. <a class="layui-btn layui-btn-normal" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
  22. <i class="layui-icon layui-icon-refresh" style="line-height:30px"></i>
  23. </a>
  24. </div>
  25. <div class="layui-fluid">
  26. <div class="layui-row layui-col-space15">
  27. <div class="layui-col-md12">
  28. <div class="layui-card">
  29. <div class="layui-card-body ">
  30. <form class="layui-form layui-col-space5">
  31. <div class="layui-input-inline layui-show-xs-block">
  32. <select name="Class_1">
  33. <option value="">所有分类</option>
  34. {{range $index, $elem := .Class_List}}
  35. <option {{if eq $elem $.Class_1 }}
  36. selected
  37. {{end}} value="{{$elem}}">{{$elem}}</option>
  38. {{end}}
  39. </select>
  40. </div>
  41. <div class="layui-input-inline layui-show-xs-block">
  42. <button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="sreach">
  43. <i class="layui-icon">&#xe615;</i></button>
  44. </div>
  45. </form>
  46. </div>
  47. <div class="layui-card-body " >
  48. <table class="layui-table layui-form">
  49. <thead>
  50. <tr>
  51. <th>编号</th>
  52. <th>分类</th>
  53. <th>标题</th>
  54. <th>详情</th>
  55. <th>时间</th>
  56. </tr>
  57. </thead>
  58. <tbody>
  59. {{range $index, $elem := .List}}
  60. <tr>
  61. <td>{{$elem.Id}}</td>
  62. <td>{{$elem.Logs_class}}</td>
  63. <td>{{$elem.Logs_Title}}</td>
  64. <td>{{$elem.Logs_Txt}}</td>
  65. <td>{{$elem.CreateTime}}</td>
  66. </tr>
  67. {{end}}
  68. </tbody>
  69. </table>
  70. </div>
  71. <div class="layui-card-body ">
  72. <div class="page">
  73. <div>
  74. {{range $index, $elem := .Pages}}
  75. {{if eq $elem.A 1}}
  76. <a class="prev" href="?page={{$elem.V}}&Name={{$.Name}}&Class_1={{$.Class_1}}">&lt;&lt;</a>
  77. {{end}}
  78. {{if eq $elem.A 2}}
  79. <a class="num" href="?page={{$elem.V}}&Name={{$.Name}}&Class_1={{$.Class_1}}">{{$elem.V}}</a>
  80. {{end}}
  81. {{if eq $elem.A 3}}
  82. <span class="current">{{$elem.V}}</span>
  83. {{end}}
  84. {{if eq $elem.A 4}}
  85. <a class="num" href="?page={{$elem.V}}&Name={{$.Name}}&Class_1={{$.Class_1}}">{{$elem.V}}</a>
  86. {{end}}
  87. {{if eq $elem.A 5}}
  88. <a class="next" href="?page={{$elem.V}}&Name={{$.Name}}&Class_1={{$.Class_1}}">&gt;&gt;</a>
  89. {{end}}
  90. {{end}}
  91. </div>
  92. Page:{{.Page}}-
  93. Page_size:{{.Page_size}}-
  94. cnt:{{.cnt}}
  95. </div>
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </body>
  102. <script>
  103. layui.use(['laydate', 'form'],
  104. function() {
  105. var laydate = layui.laydate;
  106. //执行一个laydate实例
  107. laydate.render({
  108. elem: '#start' //指定元素
  109. });
  110. //执行一个laydate实例
  111. laydate.render({
  112. elem: '#end' //指定元素
  113. });
  114. });
  115. /*用户-删除*/
  116. function member_del(obj, id) {
  117. layer.confirm('确认要删除吗?',
  118. function(index) {
  119. //发异步删除数据
  120. $(obj).parents("tr").remove();
  121. $.ajax({
  122. type: 'POST',
  123. url: 'List_Del',//发送请求
  124. data: {Id:id},
  125. success: function(result) {
  126. console.log(result)
  127. if (result.Code == 200 ){
  128. layer.msg('已删除!', {
  129. icon: 1,
  130. time: 2000
  131. });
  132. window.location.reload();
  133. }else {
  134. layer.msg('删除失败!', {
  135. time: 2000
  136. });
  137. }
  138. }
  139. });
  140. });
  141. }
  142. </script>
  143. </html>