channel.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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. headers: {
  57. Authorization: '123'
  58. },
  59. cache: false,
  60. success: function (res) {
  61. if (res.status === 0) {
  62. code = res.data.code;
  63. fileIp = res.data.fileIp;
  64. downloadId = res.data.downloadId;
  65. platform = res.data.platform;
  66. version = res.data.version;
  67. } else {
  68. toastr.error(res.msg)
  69. }
  70. }
  71. })
  72. }
  73. function handleClick2() {
  74. const data = {
  75. code: code,
  76. platform: platform,
  77. version: version,
  78. type: 5
  79. }
  80. $.ajax({
  81. url: baseUrl + '/api/channelRecord/addChannelAppDownload',
  82. data: JSON.stringify(data),
  83. type: 'post',
  84. contentType: "application/json",
  85. dataType:"json",
  86. headers: {
  87. Authorization: '123'
  88. },
  89. cache: false,
  90. success: function (res) {
  91. if (res.status === 0) {
  92. location.href = fileIp + downloadId;
  93. } else {
  94. toastr.error(res.msg)
  95. }
  96. }
  97. })
  98. }
  99. function visit() {
  100. $.ajax({
  101. url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
  102. type: 'get',
  103. cache: false,
  104. dataType: 'text',
  105. success: function () { }
  106. })
  107. }
  108. // visit()
  109. </script>
  110. </body>
  111. <style>
  112. #toast-container>.toast-error {
  113. background-image: none !important;
  114. }
  115. .toast-error {
  116. background-color: rgba(0, 0, 0, 0.8);
  117. }
  118. #toast-container>div {
  119. font-size: 14px;
  120. min-width: 80px !important;
  121. padding: 12px !important;
  122. box-shadow: none;
  123. }
  124. @media (max-width: 480px) and (min-width: 241px) {
  125. #toast-container>div {
  126. min-width: 80px !important;
  127. width: auto;
  128. }
  129. }
  130. @media only screen and (min-width: 640px) {
  131. .toast-center-center {
  132. top: 50%;
  133. left: 50%;
  134. transform: translate(-50%, -50%);
  135. }
  136. }
  137. @media only screen and (max-width: 640px) {
  138. .toast-center-center {
  139. top: 50%;
  140. left: 50%;
  141. transform: translate(-50%, -50%);
  142. }
  143. }
  144. input::-webkit-input-placeholder {
  145. color: #BBBBBB;
  146. }
  147. input::-moz-placeholder {
  148. /* Mozilla Firefox 19+ */
  149. color: #BBBBBB;
  150. }
  151. input:-moz-placeholder {
  152. /* Mozilla Firefox 4 to 18 */
  153. color: #BBBBBB;
  154. }
  155. input:-ms-input-placeholder {
  156. /* Internet Explorer 10-11 */
  157. color: #BBBBBB;
  158. }
  159. </style>
  160. </html>