courseGoApp.html 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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>下载APP</title>
  7. <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
  8. <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
  9. <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
  10. <script src="../static/js/vender/toastr/toastr.min.js"></script>
  11. <script src="../static/js/vender/config.js"></script>
  12. <style>
  13. @media screen and (max-width: 750px) {
  14. html {
  15. font-size: calc(100vw / 7.5);
  16. }
  17. }
  18. @media screen and (min-width: 750px) {
  19. html {
  20. font-size: calc(450px / 7.5);
  21. }
  22. }
  23. html, body, div, ul, li, p {
  24. padding: 0;
  25. margin: 0;
  26. }
  27. ul, li {
  28. list-style: none;
  29. }
  30. .code-container{
  31. margin: 0;
  32. padding: 0;
  33. }
  34. .img{
  35. width: 7.5rem;
  36. min-height: 100vh;
  37. }
  38. </style>
  39. </head>
  40. <body>
  41. <div class="code-container">
  42. <image class="img" src="../static/img/procedure.png"></image>
  43. </div>
  44. <script>
  45. toastr.options.positionClass = 'toast-center-center';
  46. toastr.options.timeOut = '1500';
  47. </script>
  48. <script type="text/javascript">
  49. let timer,flag = true;
  50. var url = window.location.href;
  51. url = url.split('/')
  52. var loc = window.location.search,
  53. n1 = loc.length,//地址的总长度
  54. n2 = loc.indexOf("="),//取得=号的位置
  55. id = loc.substr(n2 + 1, n1 - n2),//从=号后面的内容
  56. u = navigator.userAgent,
  57. isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),
  58. isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
  59. //埋点
  60. if(isAndroid){
  61. operate(id);
  62. }
  63. if(isiOS){
  64. const pointName = id + '_IOS'
  65. operate(pointName);
  66. }
  67. function operate(pointName,type){
  68. $.ajax({
  69. url: baseUrl + '/api/public/v1/systemBuriedPoint/stat',
  70. type: 'post',
  71. data:JSON.stringify({
  72. pointName: pointName
  73. }),
  74. contentType:"application/json",
  75. dataType: 'json',
  76. cache: false,
  77. success: function (res) {
  78. if(res.status !== 0){
  79. stopManyClick(() =>{
  80. toastr.error(res.msg)
  81. })
  82. }
  83. },
  84. })
  85. }
  86. //防止提示一秒内重复显示
  87. function stopManyClick(fn) {
  88. if (flag) {
  89. fn();
  90. }
  91. flag = false;
  92. if(timer){clearTimeout(timer);}
  93. timer = setTimeout(() => {flag = true}, 1500);
  94. }
  95. </script>
  96. </body>
  97. </html>