index.php 2.8 KB

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