channel.html 4.0 KB

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