refresh.blade.php 829 B

1234567891011121314151617181920212223242526272829303132
  1. @extends('vip.layouts')
  2. @section('seo_title','刷新缓存')
  3. @section('content')
  4. @endsection
  5. <script>
  6. function clearCache() {
  7. layer.confirm('是否确认更新缓存?', {
  8. btn: ['确认', '取消'] //按钮
  9. }, function() {
  10. $.ajax({
  11. type: 'get',
  12. url: '/admin/BaseSet/clearCache',
  13. data: {},
  14. dataType: 'json',
  15. success: function (e) {
  16. // alert(e.msg);
  17. layer.msg(e.msg);
  18. setTimeout(function () {
  19. parent.window.location.reload();
  20. }, 2000);
  21. // history.go(-1);
  22. }
  23. });
  24. });
  25. }
  26. setTimeout(function () {
  27. clearCache();
  28. }, 500)
  29. </script>