Nenhuma descrição
Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

site.htm 4.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  5. <link rel="stylesheet" type="text/css" href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css?v={$version}">
  6. <script type="text/javascript">
  7. var __root_dir__ = "__ROOT_DIR__";
  8. var __lang__ = "{$admin_lang}";
  9. </script>
  10. <script type="text/javascript" src="__STATIC__/common/js/jquery.min.js?v={$version}"></script>
  11. <script type="text/javascript" src="__PUBLIC__/plugins/layer-v3.1.0/layer.js"></script>
  12. </head>
  13. <style>
  14. .gray-bg {
  15. background-color: #f3f3f4;
  16. }
  17. .wrapper-content {
  18. padding: 20px;
  19. }
  20. .ibox {
  21. clear: both;
  22. margin-bottom: 25px;
  23. margin-top: 0;
  24. padding: 0;
  25. }
  26. .ibox-content {
  27. clear: both;
  28. background-color: #ffffff;
  29. color: inherit;
  30. padding: 15px 20px 20px 20px;
  31. border-color: #e7eaec;
  32. -webkit-border-image: none;
  33. -o-border-image: none;
  34. border-image: none;
  35. border-style: solid solid none;
  36. border-width: 1px 0px;
  37. }
  38. .progress {
  39. height: 20px;
  40. margin-bottom: 20px;
  41. overflow: hidden;
  42. background-color: #f5f5f5;
  43. border-radius: 4px;
  44. -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
  45. box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
  46. }
  47. .progress-bar{
  48. height: 100%;
  49. }
  50. .progress-bar-success {
  51. background-color: #1c84c6;
  52. }
  53. .ncap-btn-green {
  54. margin: 20px auto 0;
  55. width: 100px;
  56. height: 36px;
  57. line-height: 36px;
  58. background-color: #4fc0e8;
  59. border:1px solid #3aa8cf;
  60. text-align: center;
  61. vertical-align: middle;
  62. display: block;
  63. padding: 0px 9px;
  64. border-radius: 3px;
  65. cursor: pointer;
  66. color: #fff;
  67. font-size: 13px;
  68. }
  69. a.ncap-btn-green:hover{
  70. background-color:#3ab0da;
  71. color: #fff;
  72. text-decoration: none;
  73. }
  74. </style>
  75. <body class="gray-bg">
  76. <div class="ibox float-e-margins">
  77. <div class="ibox-content">
  78. <div class="progress progress-striped active">
  79. <div class="progress-bar progress-bar-success" role="progressbar"
  80. aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width:0%">
  81. </div>
  82. </div>
  83. <div style="text-align:center" class="success">
  84. <div class="finash" style="">
  85. <span>
  86. <font id="title">正在生成</font>
  87. <span class="filetypename"></span>
  88. </span>
  89. <span class="filefindex"></span>
  90. 已完成<span class="percent" style="color:#ff0000 ;font-size:14px;">0</span>%
  91. </div>
  92. </div>
  93. </div>
  94. <a href="javascript:void(0);" id="a_close_pop" onclick="parent.layer.closeAll();" class="ncap-btn-green" style="display: none;">关闭本窗口</a>
  95. <div class="ibox-content" id="error_msg" style="display: none">
  96. </div>
  97. </div>
  98. <script type="text/javascript">
  99. $('#a_close_pop').hide();
  100. var achieve = 0;
  101. var allpagetotal = 0;
  102. var msg = "";
  103. var timestamp1 = Date.parse(new Date());
  104. var url = "{:url('Uploadimgnew/build_site', ['_ajax'=>1])}";
  105. function send(){
  106. $.ajax({
  107. url:url,
  108. type:'POST',
  109. dataType:'json',
  110. data:{'achieve':achieve,_ajax:1},
  111. timeout : 360000, //超时时间设置,单位毫秒 设置了 1小时
  112. beforeSend:function(){
  113. },
  114. success:function(res){
  115. achieve = res.data.achievepage;
  116. allpagetotal = res.data.allpagetotal;
  117. msg += res.msg;
  118. progress = ((achieve/allpagetotal)*100).toFixed(1);
  119. $('#title').html('正在导入数据:');
  120. $(".progress-bar").css('width',progress+'%');
  121. $(".percent").text(progress);
  122. if (achieve === allpagetotal){
  123. var timestamp2 = Date.parse(new Date());
  124. var timestamp3 = (timestamp2 - timestamp1) / 1000;
  125. if (timestamp3 < 1) timestamp3 = 1;
  126. $(".finash").remove();
  127. $(".progress-bar").css('width','100%');
  128. $(".progress").removeClass('progress-striped ').removeClass('active');
  129. $(".success").html("导入数据完成,共耗时:<font color='red'>"+timestamp3+"</font> 秒");
  130. $('#a_close_pop').show();
  131. if (msg !== ""){
  132. $("#error_msg").show();
  133. $("#error_msg").prepend(msg);
  134. }
  135. return false;
  136. }
  137. send();
  138. },
  139. error:function(e){
  140. parent.layer.alert(e.responseText, {icon: 5, title:false});
  141. }
  142. });
  143. }
  144. send();
  145. </script>
  146. </body>
  147. </html>