index.php 1.2 KB

1234567891011121314151617181920212223
  1. {include file="public/frame_head"}
  2. <div class="row" style="width: 100%;margin-top: 50px; text-align: center;">
  3. <button type="button" class="btn btn-w-m btn-primary" data-url="{:Url('system.clear/refresh_cache')}">刷新数据缓存</button>
  4. <button type="button" class="btn btn-w-m btn-primary" data-url="{:Url('system.clear/delete_cache')}">清除缓存</button>
  5. <button type="button" class="btn btn-w-m btn-primary" data-url="{:Url('system.clear/delete_log')}">清除日志</button>
  6. </div>
  7. <script>
  8. $('button').on('click',function(){
  9. window.t = $(this);
  10. var _this = $(this),url =_this.data('url');
  11. $eb.$swal('delete',function(){
  12. $eb.axios.get(url).then(function(res){
  13. if(res.status == 200 && res.data.code == 200) {
  14. $eb.$swal('success',res.data.msg);
  15. }else
  16. return Promise.reject(res.data.msg || '操作失败')
  17. }).catch(function(err){
  18. $eb.$swal('error',err);
  19. });
  20. },{'title':'您确定要进行此操作吗?','text':'操作后runtime目录文件有可能被删除,请谨慎操作!','confirm':'是的,我要操作'})
  21. })
  22. </script>
  23. {include file="public/inner_footer"}