dispatch_jump.htm 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. {__NOLAYOUT__}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <title>跳转提示</title>
  6. <style type="text/css">
  7. *{ padding: 0; margin: 0; }
  8. body{ background: #fff; font-family: '微软雅黑'; color: #CCC; font-size: 16px; }
  9. .system-message{ padding: 24px 48px; margin:auto; box-shadow: 0px 0px 10px rgba(0,0,0,.2)!important; top:50%; width:500px; border-radius:2px;
  10. -moz-border-radius:10px; /* Old Firefox */}
  11. .system-message .jump{ padding-top: 10px; color: #999;text-align: center;}
  12. .system-message .success,.system-message .error{ line-height: 1.8em; color: #000; font-size: 18px;font-weight: bold; text-align: center;}
  13. .system-message .detail{ font-size: 12px; line-height: 20px; margin-top: 12px; display:none}
  14. .status-ico{margin: 20px auto;width: 73px;height: 76px;display: block;background: url(__STATIC__/admin/images/ico_right_wrong.png) no-repeat}
  15. .status-ico-ok{background-position: 0 0}
  16. .status-ico-error{background-position: -97px 0}
  17. </style>
  18. <script type="text/javascript" src="__PUBLIC__/static/common/js/jquery.tools.min.js"></script>
  19. <script type="text/javascript">
  20. $(function(){
  21. var height2=$('.system-message').height();
  22. var height1=$(window).height();
  23. $('.system-message').css('margin-top',((height1-height2)/3)-30);
  24. });
  25. </script>
  26. <!-- Bootstrap core CSS -->
  27. <link href="__PUBLIC__/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet">
  28. </head>
  29. <body>
  30. <div class="system-message">
  31. {switch name="$code"}
  32. {case value="1"}
  33. <div class="status-ico status-ico-ok"></div>
  34. <p class="success">{$msg|strip_tags=###}</p>
  35. {/case}
  36. {case value="0"}
  37. <div class="status-ico status-ico-error"></div>
  38. <p class="error">{$msg|strip_tags=###}</p>
  39. {/case}
  40. {/switch}
  41. <p class="jump">
  42. 页面自动 <a id="href" href="{$url}">跳转</a> 等待时间: <b id="wait" data-data="{$data}">{$wait}</b>
  43. </p>
  44. </div>
  45. <script type="text/javascript">
  46. (function(){
  47. var wait = document.getElementById('wait'),
  48. href = document.getElementById('href').href;
  49. var interval = setInterval(function(){
  50. var time = --wait.innerHTML;
  51. if(time <= 0) {
  52. location.href = href;
  53. clearInterval(interval);
  54. };
  55. }, 1000);
  56. /*留言自动发送邮箱*/
  57. var gbook_submit = document.getElementById('wait').getAttribute("data-data");
  58. var data = gbook_submit.split("|");
  59. if (data.length > 0 && data[0] == 'gbook_submit') {
  60. $.ajax({
  61. type: "post",
  62. data: {type:data[0],tid:data[1],aid:data[2],_ajax:1},
  63. dataType: 'json',
  64. // timeout: 3000,
  65. url: "{:url('api/Ajax/send_email')}",
  66. });
  67. }
  68. /*--end*/
  69. })();
  70. </script>
  71. </body>
  72. </html>