index.php 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. {include file="public/frame_head"}
  2. <body style="background: #f3f3f4;">
  3. <div class="layui-fluid">
  4. <div class="layui-row layui-col-space15">
  5. <div class="layui-col-md12">
  6. <div class="layui-card">
  7. <div class="layui-card-header">
  8. <div style="font-weight: bold;">刷新缓存</div>
  9. </div>
  10. <div class="layui-card-body">
  11. <div class="layui-btn-container">
  12. <button type="button" class="layui-btn layui-btn-normal" data-url="{:Url('system.clear/refresh_cache')}">刷新数据缓存</button>
  13. <button type="button" class="layui-btn layui-btn-danger" data-url="{:Url('system.clear/delete_cache')}">清除缓存</button>
  14. <button type="button" class="layui-btn layui-btn-danger" data-url="{:Url('system.clear/delete_log')}">清除日志</button>
  15. <!--<button type="button" class="btn btn-w-m layui-btn-normal" onclick="action.data_compatible()">数据兼容</button>-->
  16. </div>
  17. </div>
  18. </div>
  19. </div>
  20. </div>
  21. </div>
  22. <!--<script src="/publick/sytem/js/index.js"></script>-->
  23. <script src="{__ADMIN_PATH}js/layuiList.js"></script>
  24. <script>
  25. $('.layui-btn').on('click',function(){
  26. window.t = $(this);
  27. var _this = $(this),url =_this.data('url');
  28. $eb.$swal('delete',function(){
  29. $eb.axios.get(url).then(function(res){
  30. if(res.status == 200 && res.data.code == 200) {
  31. $eb.$swal('success',res.data.msg);
  32. }else
  33. return Promise.reject(res.data.msg || '操作失败')
  34. }).catch(function(err){
  35. $eb.$swal('error',err);
  36. });
  37. },{'title':'您确定要进行此操作吗?','text':'操作后runtime目录文件有可能被删除,请谨慎操作!','confirm':'是的,我要操作'})
  38. });
  39. //自定义方法
  40. var action= {
  41. data_compatible: function () {
  42. var loading = layer.load(0, {
  43. shade: [0.1,'#fff'],
  44. time: 100*1000
  45. });
  46. layList.baseGet(layList.Url({
  47. c: 'system.system_clear' ,
  48. a: 'data_compatible',
  49. q: {}
  50. }), function (res) {
  51. layer.close(loading)
  52. layList.msg(res.msg);
  53. }, function (){
  54. layer.close(loading)
  55. layList.msg(res.msg);
  56. });
  57. },
  58. }
  59. </script>
  60. {include file="public/inner_footer"}
  61. </body>