monthpaywait.blade.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>请等待</title>
  8. <style>
  9. * {
  10. padding: 0;
  11. margin: 0;
  12. }
  13. html,
  14. body {
  15. height: 100%;
  16. -webkit-background-size: cover;
  17. -moz-background-size: cover;
  18. -o-background-size: cover;
  19. background-size: cover;
  20. position: relative;
  21. }
  22. .page{
  23. overflow: auto;
  24. margin: auto;
  25. text-align: center;
  26. position: absolute;
  27. top:40%;
  28. left: 20%;
  29. }
  30. .page span{
  31. font-size:22px;
  32. line-height:40px;
  33. display: block;
  34. }
  35. .page .text{
  36. background:rgba(51,51,51,0.9);
  37. padding: 10px;
  38. border-radius: 5px;
  39. color:#fff;
  40. }
  41. .page img{
  42. position:absolute;
  43. display:block;
  44. width:60%;
  45. top:15%;
  46. }
  47. #second{
  48. font-size:25px;
  49. }
  50. .page .button{
  51. position:absolute;
  52. top:55%;
  53. height:30px;
  54. width:100%;
  55. }
  56. .page .button p{
  57. width:60%;
  58. font-size:20px;
  59. line-height:40px;
  60. text-align:center;
  61. background-color:#38B2FF;
  62. border-radius:3px;
  63. color:#fff;
  64. }
  65. </style>
  66. </head>
  67. <body>
  68. <div class="page">
  69. <span class="text">包月处理中,请勿退出...<span id="second">9</span></span>
  70. </div>
  71. </body>
  72. <script src="//apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
  73. <script>
  74. window.onload = function(){
  75. interval();
  76. var time;
  77. var num;
  78. function interval(){
  79. num = parseInt(document.getElementById('second').innerHTML);
  80. time = setInterval(function(){
  81. if(num < 0){
  82. clearInterval(time);
  83. location.href = "{!! $url !!}";
  84. }else{
  85. ajax();
  86. document.getElementById('second').innerHTML = num--
  87. }
  88. },1000)
  89. }
  90. function ajax(){
  91. $.ajax({
  92. url:"/api/monthorder/issuccess",
  93. success:function(res){
  94. if(res['code'] == 0){
  95. clearInterval(time);
  96. location.href = "{!! $url !!}";
  97. }
  98. }
  99. });
  100. }
  101. }
  102. </script>
  103. </html>