downloadApp2.html 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <meta name="viewport"
  7. content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
  8. <title>极速驾培app下载</title>
  9. <style type="text/css">
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. border: 0;
  15. }
  16. #app {
  17. width: 100%;
  18. position: relative;
  19. overflow: hidden;
  20. }
  21. .password1 {
  22. top: 31vw;
  23. position: absolute;
  24. left: 12.8vw;
  25. width: 74vw;
  26. }
  27. .download1 {
  28. top: 54vw;
  29. position: absolute;
  30. left: 12.8vw;
  31. width: 74vw;
  32. }
  33. .password2 {
  34. top: 125vw;
  35. position: absolute;
  36. left: 12.8vw;
  37. width: 74vw;
  38. }
  39. .download2 {
  40. top: 147vw;
  41. position: absolute;
  42. left: 12.8vw;
  43. width: 74vw;
  44. }
  45. .logo1 {
  46. width: 50%;
  47. position: absolute;
  48. left: 25%;
  49. top: 17vw;
  50. }
  51. .logo2 {
  52. width: 50%;
  53. position: absolute;
  54. left: 25%;
  55. top: 108vw;
  56. }
  57. .icon1 {
  58. position: absolute;
  59. width: 98vw;
  60. left: 1vw;
  61. top: 39vw;
  62. }
  63. .icon2 {
  64. position: absolute;
  65. width: 98vw;
  66. left: 1vw;
  67. top: 123vw;
  68. }
  69. .bg {
  70. width: 100%;
  71. overflow: hidden;
  72. font-size: 0;
  73. }
  74. .qr {
  75. position: absolute;
  76. top: 121vw;
  77. width: 25vw;
  78. height: 25vw;
  79. left: 37.5vw;
  80. }
  81. .button1 {
  82. width: 64vw;
  83. line-height: 12.8vw;
  84. background: #498EF5;
  85. border-radius: 48px;
  86. font-size: 6.4vw;
  87. position: absolute;
  88. top: 125vw;
  89. left: 18vw;
  90. color: #fff;
  91. text-align: center;
  92. }
  93. .button2 {
  94. position: absolute;
  95. width: 64vw;
  96. line-height: 12.8vw;
  97. background: #498EF5;
  98. border-radius: 48px;
  99. font-size: 6.4vw;
  100. top: 145vw;
  101. left: 18vw;
  102. color: #fff;
  103. text-align: center;
  104. }
  105. #wx-download {
  106. position: fixed;
  107. top: 0;
  108. left: 0;
  109. width: 100vw;
  110. z-index: 999;
  111. display: none;
  112. }
  113. #wx-download>img {
  114. width: 100vw;
  115. }
  116. </style>
  117. </head>
  118. <body>
  119. <div class="#app">
  120. <div id="wx-download">
  121. <img src="./assets/wx_download.png">
  122. </div>
  123. <img class="bg" src="https://t1-1305573081.file.myqcloud.com/test/adown/bg3.png">
  124. <img class="icon1" src="https://t1-1305573081.file.myqcloud.com/test/adown/icon1.png">
  125. <img class="icon2" src="https://t1-1305573081.file.myqcloud.com/test/adown/icon2.png">
  126. <img class="logo1" src="https://t1-1305573081.file.myqcloud.com/test/adown/logo2.png">
  127. <img class="logo2" src="https://t1-1305573081.file.myqcloud.com/test/adown/logo3.png">
  128. <a href="./password1.html"> <img class="password1"
  129. src="https://t1-1305573081.file.myqcloud.com/test/adown/student_password.png"></a>
  130. <img class="download1" onclick="downLoadApp1()"
  131. src="https://t1-1305573081.file.myqcloud.com/test/adown/download_button1.png">
  132. <a href="./password2.html"><img class="password2"
  133. src="https://t1-1305573081.file.myqcloud.com/test/adown/teacher_password.png"></a>
  134. <img class="download2" onclick="downLoadApp2()"
  135. src="https://t1-1305573081.file.myqcloud.com/test/adown/download_button2.png">
  136. <!-- <img class="qr" src="https://t1-1305573081.file.myqcloud.com/test/adown/qr.png"> -->
  137. <!-- <div onclick="downLoadApp1()" class="button1">
  138. 点击下载1
  139. </div>
  140. <div onclick="downLoadApp2()" class="button2">
  141. 点击下载2
  142. </div> -->
  143. </div>
  144. <script>
  145. var jsjp_android = 'https://t1-1305573081.cos.ap-shanghai.myqcloud.com/apk/fj_student_2.1.5.apk'
  146. var jlgj_android = 'https://t1-1305573081.file.myqcloud.com/apk/jlgj1.2.6.apk'
  147. var ajax1 = new XMLHttpRequest()
  148. var ajax2 = new XMLHttpRequest()
  149. ajax1.open('get', "https://jsjp-admin.zzxcx.net/jsjp-admin/open-api/gzpt/userInfo/configKey/jsjp_android")
  150. ajax1.send()
  151. ajax1.onreadystatechange = function () {
  152. if (ajax1.status == 200 && ajax1.readyState == 4) {
  153. jsjp_android = JSON.parse(ajax1.responseText).data
  154. }
  155. }
  156. ajax2.open('get', "https://jsjp-admin.zzxcx.net/jsjp-admin/open-api/gzpt/userInfo/configKey/coach_android")
  157. ajax2.send()
  158. ajax2.onreadystatechange = function () {
  159. if (ajax2.status == 200 && ajax2.readyState == 4) {
  160. jlgj_android = JSON.parse(ajax2.responseText).data
  161. }
  162. }
  163. function getPhoneSystem() {
  164. var u = navigator.userAgent;
  165. if (u.indexOf('Android') > -1) {
  166. return 'android'
  167. }
  168. if (u.indexOf("iPhone") > -1 || u.indexOf("iOS") > -1) {
  169. return 'ios';
  170. }
  171. }
  172. function isWeixin() {
  173. var ua = navigator.userAgent.toLowerCase();
  174. if (ua.search('micromessenger') !== -1) {
  175. return true;
  176. } else {
  177. return false;
  178. }
  179. }
  180. function downLoadApp1() {
  181. if (getPhoneSystem() == 'ios') {
  182. // window.location.href = 'https://apps.apple.com/us/app/极速驾培/id1214200225'
  183. window.location.href = "https://apps.apple.com/cn/app/极速驾培/id1214200225"
  184. return
  185. }
  186. else if (getPhoneSystem() == 'android' && isWeixin() == false) {
  187. window.location.href = jsjp_android
  188. return
  189. }
  190. else {
  191. document.getElementById('wx-download').style = 'display:block'
  192. document.getElementById('wx-download').onclick = function (e) {
  193. document.getElementById('wx-download').style = 'display:none'
  194. }
  195. // const a = document.createElement('a')
  196. // a.href = jsjp_android
  197. // a.download = 'fj_student.apk'
  198. // document.body.append(a)
  199. // a.click()
  200. // document.body.removeChild(a)
  201. // window.location.href = "https://itunes.apple.com/cn/app/id1214200225"
  202. }
  203. }
  204. function downLoadApp2() {
  205. if (getPhoneSystem() == 'ios') {
  206. // window.location.href = 'https://apps.apple.com/us/app/极速驾培/id1214200225'
  207. window.location.href = "https://apps.apple.com/cn/app/教练管家/id1214203182"
  208. return
  209. }
  210. else if (getPhoneSystem() == 'android' && isWeixin() == false) {
  211. window.location.href = jlgj_android
  212. return
  213. }
  214. else {
  215. document.getElementById('wx-download').style = 'display:block'
  216. document.getElementById('wx-download').onclick = function (e) {
  217. document.getElementById('wx-download').style = 'display:none'
  218. }
  219. // window.location.href = "https://itunes.apple.com/cn/app/id1214200225"
  220. }
  221. }
  222. </script>
  223. </body>
  224. </html>