channel.html 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <!DOCTYPE html>
  2. <html lang="en" xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>双子星</title>
  6. <meta name="viewport" content="width=device-width, initial-scale=1">
  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/css/normalize2.css">
  10. <link rel="stylesheet" href="../static/css/experience2.css">
  11. <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
  12. <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
  13. <script src="../static/js/vender/bootstrap/js/bootstrap.min.js"></script>
  14. <script src="../static/js/vender/toastr/toastr.min.js"></script>
  15. <script src="../static/js/vender/config.js"></script>
  16. <script>
  17. toastr.options.positionClass = 'toast-center-center';
  18. </script>
  19. </head>
  20. <div class="top free-code-con" style="position:relative;background: #169af2;">
  21. <!-- <p th:text="${fileCenterDownloadIp}" id="fileCenterDownloadIp" hidden="hidden">test</p>
  22. <p th:text="${code}" id="code" hidden="hidden">test</p>
  23. <p th:text="${platform}" id="platform" hidden="hidden">test</p>
  24. <p th:text="${version}" id="version" hidden="hidden">test</p>
  25. <p th:text="${downloadId}" id="downloadId" hidden="hidden">test</p> -->
  26. <div class="bottom-img">
  27. <div class="center-pic">
  28. <div class="recv-cont" id="recv_cont">
  29. <div onclick="handleClick2()" style="position: relative">
  30. <div class="recv-btn" id="recv_btn">
  31. <img src="../static/img/experienceBtn.png" alt="" style="width: 100%">
  32. <div class="btn-bg-style">
  33. <span>领取体验时长并下载</span>
  34. <img src="../static/img/xing_icon.png" alt="">
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. </div>
  41. </div>
  42. <script type="text/javascript" th:inline="javascript">
  43. // var baseUrl = 'http://14.18.190.141:38051'
  44. let code = '', platform = '', version = '', fileIp = '', downloadId = '';
  45. goAppDownload();
  46. function goAppDownload() {
  47. const data = {
  48. code: GetRequest().code,
  49. platform: GetRequest().platform
  50. }
  51. $.ajax({
  52. url: baseUrl + `/api/ditch/goAppDownload?code=${data.code}&platform=${data.platform}`,
  53. type: 'get',
  54. contentType: "application/json",
  55. dataType: 'json',
  56. cache: false,
  57. success: function (res) {
  58. if (res.status === 0) {
  59. code = res.data.code;
  60. fileIp = res.data.fileIp;
  61. downloadId = res.data.downloadId;
  62. platform = res.data.platform;
  63. version = res.data.version;
  64. } else {
  65. toastr.error(res.msg)
  66. }
  67. }
  68. })
  69. }
  70. function handleClick2() {
  71. const data = {
  72. code: code,
  73. platform: platform,
  74. version: version,
  75. type: 5
  76. }
  77. $.ajax({
  78. url: baseUrl + '/api/channelRecord/addChannelAppDownload',
  79. data: JSON.stringify(data),
  80. type: 'post',
  81. contentType: "application/json",
  82. dataType: 'json',
  83. cache: false,
  84. success: function (res) {
  85. if (res.status === 0) {
  86. location.href = fileIp + downloadId;
  87. } else {
  88. toastr.error(res.msg)
  89. }
  90. }
  91. })
  92. }
  93. function visit() {
  94. $.ajax({
  95. url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
  96. type: 'get',
  97. cache: false,
  98. dataType: 'text',
  99. success: function () { }
  100. })
  101. }
  102. visit()
  103. </script>
  104. </body>
  105. <style>
  106. #toast-container>.toast-error {
  107. background-image: none !important;
  108. }
  109. .toast-error {
  110. background-color: rgba(0, 0, 0, 0.8);
  111. }
  112. #toast-container>div {
  113. font-size: 14px;
  114. min-width: 80px !important;
  115. padding: 12px !important;
  116. box-shadow: none;
  117. }
  118. @media (max-width: 480px) and (min-width: 241px) {
  119. #toast-container>div {
  120. min-width: 80px !important;
  121. width: auto;
  122. }
  123. }
  124. @media only screen and (min-width: 640px) {
  125. .toast-center-center {
  126. top: 50%;
  127. left: 50%;
  128. transform: translate(-50%, -50%);
  129. }
  130. }
  131. @media only screen and (max-width: 640px) {
  132. .toast-center-center {
  133. top: 50%;
  134. left: 50%;
  135. transform: translate(-50%, -50%);
  136. }
  137. }
  138. input::-webkit-input-placeholder {
  139. color: #BBBBBB;
  140. }
  141. input::-moz-placeholder {
  142. /* Mozilla Firefox 19+ */
  143. color: #BBBBBB;
  144. }
  145. input:-moz-placeholder {
  146. /* Mozilla Firefox 4 to 18 */
  147. color: #BBBBBB;
  148. }
  149. input:-ms-input-placeholder {
  150. /* Internet Explorer 10-11 */
  151. color: #BBBBBB;
  152. }
  153. </style>
  154. </html>