download.html 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http - equiv="X-UA-Compatible" content="IE=edge,chorme=1">
  6. <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=0">
  7. <title>{$detail.nickname}</title>
  8. <style>
  9. html,body {
  10. width: 100%;
  11. height: 100%;
  12. margin: 0;
  13. padding: 0;
  14. }
  15. .modal-open {
  16. position: fixed;
  17. width: 100%;
  18. }
  19. img {
  20. width: 100%;
  21. }
  22. /*********************遮罩层*******************/
  23. #Mask-weChat {
  24. display: none;
  25. position: fixed;
  26. top: 0;
  27. left: 0;
  28. bottom: 0;
  29. right: 0;
  30. background: #4a4a4a;
  31. z-index: 5000000;
  32. }
  33. #Mask-weChat .weChatTip-container {
  34. width: 78%;
  35. margin-top: 2%;
  36. margin-left: 20%;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <!-- 当在微信浏览器打开时所提示的遮罩层,请在浏览器打开的提示 -->
  42. <div id="Mask-weChat" class="modal-open">
  43. <div class="weChatTip-container">
  44. <img src="__STATIC__/images/prompt_1.png" alt="">
  45. </div>
  46. </div>
  47. </body>
  48. <script src="__STATIC__/js/home/jquery.js"></script>
  49. <script type="text/javascript">
  50. //判断设备是否使用微信浏览器打开的
  51. function is_weixn() {
  52. var ua = navigator.userAgent.toLowerCase();
  53. if (ua.match(/MicroMessenger/i) == "micromessenger") {
  54. return true;
  55. } else {
  56. return false;
  57. }
  58. }
  59. //如果是微信浏览器则提示在浏览器上打开
  60. if (is_weixn() == true) {
  61. //显示遮罩层
  62. showMask();
  63. } else {
  64. // 游戏下载apk链接
  65. window.location.href = "{$detail.download}";
  66. }
  67. //显示遮罩层
  68. function showMask() {
  69. document.getElementById("Mask-weChat").style.display = "block";
  70. }
  71. </script>
  72. </html>