down.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. <!doctype html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <script src="./js/JQ.js"></script>
  6. <script src="./js/copy.js"></script>
  7. <style>
  8. .div {
  9. width: 100%;
  10. height: 100%;
  11. position: relative;
  12. }
  13. .top {
  14. width: 100%;
  15. height: 100%;
  16. }
  17. .bottom {
  18. position: fixed;
  19. width: 100%;
  20. bottom: 0;
  21. left: 0;
  22. right: 0;
  23. }
  24. img {
  25. width: 100%;
  26. height: 100%;
  27. }
  28. .logo {
  29. margin-top: -200px;
  30. display: flex;
  31. flex-direction: column;
  32. justify-content: center;
  33. align-items: center;
  34. }
  35. .logo_icon {
  36. width: 300px;
  37. height: 300px;
  38. }
  39. .logo_font {
  40. margin-top: 20px;
  41. font-size: 60px;
  42. color: #333;
  43. font-weight: 300;
  44. }
  45. .button1 {
  46. left: 50%;
  47. margin-left: -350px;
  48. z-index: 2;
  49. position: fixed;
  50. bottom: 500px;
  51. width: 700px;
  52. height: 125px;
  53. display: flex;
  54. justify-content: center;
  55. }
  56. .button {
  57. left: 50%;
  58. margin-left: -350px;
  59. display: flex;
  60. justify-content: center;
  61. z-index: 2;
  62. position: fixed;
  63. bottom: 320px;
  64. width: 700px;
  65. height: 125px;
  66. }
  67. .weixin-tip {
  68. display: none;
  69. position: fixed;
  70. left: 0;
  71. top: 0;
  72. bottom: 0;
  73. background: rgba(0, 0, 0, 0.8);
  74. filter: alpha(opacity=80);
  75. height: 100%;
  76. width: 100%;
  77. z-index: 100;
  78. }
  79. .weixin-tip p {
  80. text-align: center;
  81. margin-top: 10%;
  82. padding: 0 5%;
  83. }
  84. * {
  85. padding: 0;
  86. margin: 0;
  87. box-sizing: border-box
  88. }
  89. #hide {
  90. opacity: 0;
  91. }
  92. </style>
  93. </head>
  94. <body>
  95. <div class="div">
  96. <div class="top">
  97. <img src="./image/top.png" alt="">
  98. </div>
  99. <div class="logo">
  100. <img class="logo_icon" src="./image/logo1.png" alt="">
  101. <div class="logo_font">
  102. 宏根蒂
  103. </div>
  104. </div>
  105. <a class="button1" id="url" href="">
  106. <img class="button1" src="./image/anzhuo.png" alt="">
  107. </a>
  108. <!-- <a class="button" href="#">
  109. <img class="button" src="./image/apple.png" alt="">
  110. </a> -->
  111. <div class="bottom">
  112. <img src="./image/bottom.png" alt="">
  113. </div>
  114. </div>
  115. <!-- <div class="weixin-tip">
  116. <p>
  117. <img src="./image/live_weixin.png" alt="微信打开" />
  118. </p>
  119. </div> -->
  120. <input type="text" id="hide" style="opacity: 0;height: 19px;">
  121. </body>
  122. <script type="text/javascript">
  123. function downapp() {
  124. $.ajax({
  125. type: "get",
  126. url: "http://hgd.liuniu946.com/api/version",
  127. data: {},
  128. dataType: "json",
  129. success: function(data) {
  130. // document.getElementById('url').href = 'http://hgd.liuniu946.com' + data.data.apk
  131. window.location.href = data.data.url
  132. // console.log()
  133. }
  134. });
  135. }
  136. var url = location.search;
  137. if (url.indexOf("?") != -1) {
  138. var str = url.substr(1);
  139. strs = str.split("=");
  140. var invitation = strs[1];
  141. console.log(invitation);
  142. document.getElementById('hide').value = invitation;
  143. }
  144. function copyToClip(content) {
  145. console.log(111);
  146. if (navigator.clipboard && window.isSecureContext) {
  147. console.log(222);
  148. navigator.clipboard.writeText(content).then(
  149. // 复制成功callback
  150. function() {
  151. if (tips == null) {
  152. console.log('复制成功')
  153. } else {}
  154. },
  155. // 复制失败callback
  156. function() {
  157. console.log("复制失败");
  158. },
  159. )
  160. }
  161. }
  162. $('.button1').click(function() {
  163. $('#hide').val(); //把要复制的内容给到这里
  164. $('#hide').select();
  165. try {
  166. var state = document.execCommand('copy');
  167. } catch (err) {
  168. var state = false;
  169. }
  170. if (state) {
  171. //复制成功
  172. // $(this).hide()
  173. // $(this).next().show()
  174. } else {
  175. //复制失败
  176. }
  177. })
  178. $(window).on("load", function() {
  179. var winHeight = $(window).height();
  180. function is_weixin() {
  181. var ua = navigator.userAgent.toLowerCase();
  182. if (ua.match(/MicroMessenger/i) == "micromessenger") {
  183. return true;
  184. } else {
  185. return false;
  186. }
  187. }
  188. var isWeixin = is_weixin();
  189. if (isWeixin) {
  190. $(".weixin-tip").css("height", winHeight);
  191. $(".weixin-tip").show();
  192. }
  193. $.ajax({
  194. type: "get",
  195. url: "http://hgd.liuniu946.com/api/version",
  196. data: {},
  197. dataType: "json",
  198. success: function(data) {
  199. document.getElementById('url').href = data.data.url
  200. }
  201. });
  202. })
  203. </script>
  204. </html>