cloudanniversaryActive.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. <!DOCTYPE html>
  2. <html lang="zh-CN">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
  6. <title>双子星云手机</title>
  7. <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
  8. <link rel="stylesheet" href="../static/js/vender/bootstrap/css/bootstrap.min.css">
  9. <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
  10. <link rel="stylesheet" href="../static/css/cloudanniversaryActive.css">
  11. <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
  12. <script src="../static/js/vender/toastr/toastr.min.js"></script>
  13. <script src="../static/js/vender/config.js"></script>
  14. <script src="../static/js/vender/crypto-js.js"></script>
  15. <script src="../static/js/vender/ase.js"></script>
  16. </head>
  17. <body>
  18. <div class="containers">
  19. <div class="banner-wrap">
  20. <div class="img-title">
  21. <img class="banner-img" src="../static/img/yunActivity/top.png">
  22. </div>
  23. <div class="img-downlond">
  24. <img class="downlond-img" src="../static/img/yunActivity/newdowlnd1.png">
  25. </div>
  26. <div class="midimg-downlond">
  27. <img class="downlond-midimg" src="../static/img/yunActivity/newdowlnd.png">
  28. </div>
  29. </div>
  30. </div>
  31. <script>
  32. toastr.options.positionClass = 'toast-center-center';
  33. toastr.options.timeOut = '3000';
  34. </script>
  35. <script type="text/javascript">
  36. // var baseUrl = 'http://14.18.190.141:1280'
  37. let timer, flag = true;
  38. var url = window.location.href;
  39. url = url.split('/')
  40. var loc = window.location.search,
  41. n1 = loc.length,//地址的总长度
  42. n2 = loc.indexOf("="),//取得=号的位置
  43. id = loc.substr(n2 + 1, n1 - n2),//从=号后面的内容
  44. u = navigator.userAgent,
  45. ua = navigator.userAgent.toLowerCase(),
  46. isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
  47. isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
  48. $('.downlond-img')[0].addEventListener('click',()=>{
  49. if(isAndroid){
  50. const pointName = id + '渠道h5落地页安卓点击'
  51. operate(pointName,'click');
  52. download()
  53. }else if(isIOS){
  54. const pointName = id + '渠道h5落地页打开IOS点击'
  55. operate(pointName);
  56. download()
  57. }
  58. // download()
  59. },false)
  60. $('.downlond-midimg')[0].addEventListener('click',()=>{
  61. if(isAndroid){
  62. const pointName = id + '渠道h5落地页安卓点击'
  63. operate(pointName,'click');
  64. download()
  65. }else if(isIOS){
  66. const pointName = id + '渠道h5落地页打开IOS点击'
  67. operate(pointName);
  68. download()
  69. }
  70. // download()
  71. },false)
  72. function download() {
  73. if (isAndroid) {
  74. window.location.href = window.location.protocol === 'https:' ? `https://file.phone.androidscloud.com:8121/document/newFile/download/1/edv834e74a9c43eaac02/LowLevelMultipartUpload_19066905949412147255/shuangzixing.apk` :
  75. `http://110.53.221.195:8210/document/newFile/download/1/edv834e74a9c43eaac02/LowLevelMultipartUpload_19066905949412147255/shuangzixing.apk`;
  76. stopManyClick(() =>{
  77. toastr.error('下载成功')
  78. })
  79. } else if (isIOS) {
  80. document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
  81. // toastr.error('下载成功')
  82. }
  83. }
  84. // 埋点下载
  85. function operate(pointName) {
  86. $.ajax({
  87. url: baseUrl + '/api/public/v1/systemBuriedPoint/stat',
  88. type: 'post',
  89. data: JSON.stringify({
  90. pointName: pointName
  91. }),
  92. contentType: "application/json",
  93. dataType: 'json',
  94. cache: false,
  95. success: function (res) {},
  96. })
  97. }
  98. // 埋点页面访问
  99. // var newpage = window.location.search.substring(6);
  100. $(function() {
  101. pushHistory();
  102. function pushHistory() {
  103. var warids = {
  104. "pointName": `渠道h5落地页打开${id}`
  105. }
  106. $.ajax({
  107. url: baseUrl + "/api/public/v1/systemBuriedPoint/stat",
  108. data: JSON.stringify(warids),
  109. type: 'post',
  110. dataType: 'json',
  111. contentType: "application/json;charset=UTF-8",
  112. cache: false,
  113. success: function(data) {}
  114. })
  115. }
  116. });
  117. function stopManyClick(fn) {
  118. if (flag) {
  119. fn();
  120. }
  121. flag = false;
  122. if (timer) { clearTimeout(timer); }
  123. timer = setTimeout(() => { flag = true }, 1500);
  124. }
  125. </script>
  126. </body>
  127. </html>