maintenance.blade.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. @extends('_layout')
  2. @section('title', '维护 | Maintenance')
  3. @section('body_class','page-login-v3 layout-full')
  4. @section('layout_content')
  5. <!--[if lt IE 8]> <p class="browserupgrade">您正在使用 <strong>过时/老旧</strong> 的浏览器。 为了您的使用体验,请
  6. <a href="http://browsehappy.com/" target="_blank">升级您的浏览器</a> <br/>You are using an <strong>outdated</strong>
  7. browser. Please
  8. <a href="http://browsehappy.com/" target="_blank">upgrade your browser</a> to improve your experience.</p>
  9. <![endif]-->
  10. <div class="page vertical-align text-center" data-animsition-in="fade-in" data-animsition-out="fade-out">>
  11. <div class="page-content vertical-align-middle">
  12. <i class="icon wb-settings icon-spin font-size-70" aria-hidden="true"></i>
  13. <h2>维护建设中</h2>
  14. {!! $message !!}
  15. <footer class="page-copyright">
  16. <p id="countdown"></p>
  17. </footer>
  18. </div>
  19. </div>
  20. @endsection
  21. @section('layout_javascript')
  22. <script>
  23. // 每秒更新计时器
  24. const countDownDate = new Date("{{$time}}").getTime();
  25. const x = setInterval(function() {
  26. const distance = countDownDate - new Date().getTime();
  27. const days = Math.floor(distance / 86400000);
  28. const hours = Math.floor(distance % 86400000 / 3600000);
  29. const minutes = Math.floor(distance % 3600000 / 60000);
  30. const seconds = Math.floor(distance % 60000 / 1000);
  31. document.getElementById('countdown').innerHTML = '<h2>' + days + ' <span> 天 </span>: ' + hours +
  32. ' <span>时</span>: ' + minutes + ' <span>分 </span>: ' + seconds + '<span> 秒</span> </h2>';
  33. if (distance <= 0) {
  34. clearInterval(x);
  35. document.getElementById('countdown').remove();
  36. }
  37. }, 1000);
  38. </script>
  39. @endsection