index.php 1.1 KB

12345678910111213141516171819202122
  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_log')}">清除日志</button>
  5. </div>
  6. <script>
  7. $('button').on('click',function(){
  8. window.t = $(this);
  9. var _this = $(this),url =_this.data('url');
  10. $eb.$swal('delete',function(){
  11. $eb.axios.get(url).then(function(res){
  12. if(res.status == 200) {
  13. $eb.$swal('success',res.data.msg);
  14. }else
  15. return Promise.reject(res.data.msg || '操作失败')
  16. }).catch(function(err){
  17. $eb.$swal('error',err);
  18. });
  19. },{'title':'您确定要进行此操作吗?','text':'操作后runtime目录文件有可能被删除,请谨慎操作!','confirm':'是的,我要操作'})
  20. })
  21. </script>
  22. {include file="public/inner_footer"}