index.php 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. {extend name="public/container"}
  2. {block name="content"}
  3. <div class="layui-fluid">
  4. <div class="layui-card">
  5. <div class="layui-card-body">
  6. <div class="ibox-content">
  7. <div class="table-responsive">
  8. <table class="table table-striped table-bordered">
  9. <thead>
  10. <tr>
  11. <th class="text-center">类型</th>
  12. <th class="text-center">文件地址</th>
  13. <th class="text-center">校验码</th>
  14. <th class="text-center">上次访问时间</th>
  15. <th class="text-center">上次修改时间</th>
  16. <th class="text-center">上次改变时间</th>
  17. </tr>
  18. </thead>
  19. <tbody class="">
  20. {volist name="cha" id="vo"}
  21. <tr>
  22. <td class="text-center">
  23. <span style="color: #ff0000">[{$vo.type}]</span>
  24. </td>
  25. <td class="text-left">
  26. {$vo.filename}
  27. </td>
  28. <td class="text-center">
  29. {$vo.cthash}
  30. </td>
  31. <td class="text-center">
  32. {$vo.atime|date='Y-m-d H:i:s',###}
  33. </td>
  34. <td class="text-center">
  35. {$vo.mtime|date='Y-m-d H:i:s',###}
  36. </td>
  37. <td class="text-center">
  38. {$vo.ctime|date='Y-m-d H:i:s',###}
  39. </td>
  40. </tr>
  41. {/volist}
  42. </tbody>
  43. </table>
  44. </div>
  45. </div>
  46. </div>
  47. </div>
  48. </div>
  49. {/block}
  50. {block name="script"}
  51. <script>
  52. $('.btn-warning').on('click',function(){
  53. var _this = $(this),url =_this.data('url');
  54. $eb.$swal('delete',function(){
  55. $eb.axios.get(url).then(function(res){
  56. console.log(res);
  57. if(res.status == 200 && res.data.code == 200) {
  58. $eb.$swal('success',res.data.msg);
  59. _this.parents('tr').remove();
  60. }else
  61. return Promise.reject(res.data.msg || '删除失败')
  62. }).catch(function(err){
  63. $eb.$swal('error',err);
  64. });
  65. })
  66. });
  67. </script>
  68. {/block}