down.html 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js"></script>
  5. <style>
  6. .div {
  7. width: 100%;
  8. height: 100%;
  9. position: relative;
  10. }
  11. .button {
  12. margin-left: 10%;
  13. position: absolute;
  14. bottom: 40px;
  15. width: 80%;
  16. text-align: center;
  17. z-index: 999;
  18. height: 140px;
  19. font-size: 32px;
  20. line-height: 140px;
  21. letter-spacing: 5px;
  22. background-color: #32baff;
  23. border-radius: 5px;
  24. color: white;
  25. }
  26. .img {
  27. position: relative;
  28. width: 100%;
  29. }
  30. img {
  31. max-width: 100%;
  32. height: auto;
  33. }
  34. .weixin-tip {
  35. display: none;
  36. position: fixed;
  37. left: 0;
  38. top: 0;
  39. bottom: 0;
  40. background: rgba(0, 0, 0, 0.8);
  41. filter: alpha(opacity=80);
  42. height: 100%;
  43. width: 100%;
  44. z-index: 100;
  45. }
  46. .weixin-tip p {
  47. text-align: center;
  48. margin-top: 10%;
  49. padding: 0 5%;
  50. }
  51. * {
  52. padding: 0;
  53. margin: 0;
  54. box-sizing: border-box
  55. }
  56. </style>
  57. </head>
  58. <body>
  59. <div class="div">
  60. <img class="img" src="/static/img/down.jpg"/>
  61. <a href="{$apk}" downLoad="xhg.apk">
  62. <div class="button">Android版本下载</div>
  63. </a>
  64. </div>
  65. <div class="weixin-tip">
  66. <p>
  67. <img src="/static/img/live_weixin.png" alt="微信打开"/>
  68. </p>
  69. </div>
  70. </body>
  71. <script>
  72. $(window).on("load", function () {
  73. var winHeight = $(window).height();
  74. function is_weixin() {
  75. var ua = navigator.userAgent.toLowerCase();
  76. if (ua.match(/MicroMessenger/i) == "micromessenger") {
  77. return true;
  78. } else {
  79. return false;
  80. }
  81. }
  82. var isWeixin = is_weixin();
  83. if (isWeixin) {
  84. $(".weixin-tip").css("height", winHeight);
  85. $(".weixin-tip").show();
  86. }
  87. })
  88. </script>
  89. </html>