index1.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219
  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/normalize.css">
  10. <link rel="stylesheet" href="../static/css/experience.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>
  16. toastr.options.positionClass = 'toast-center-center';
  17. </script>
  18. </head>
  19. <body>
  20. <div class="top free-code-con" style="position:relative;">
  21. <div>
  22. <img src="../static/img/experienceBg3.png" alt="" class="bottom-img">
  23. </div>
  24. <div class="center-pic">
  25. <div class="recv-cont" id="recv_cont">
  26. <div style="position: relative;">
  27. <input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
  28. </div>
  29. <div onclick="handleClick()" style="position: relative">
  30. <div class="recv-btn" id="recv_btn">
  31. <span style="position: relative;">
  32. 领取体验时长并下载
  33. <img src="../static/img/xing_icon.png" alt="">
  34. </span>
  35. </div>
  36. </div>
  37. </div>
  38. </div>
  39. </div>
  40. <script type="text/javascript" th:inline="javascript">
  41. var url = window.location.href;
  42. url = url.split('/')
  43. var baseUrl = 'http://' + url[2]
  44. // var baseUrl = 'http://14.215.128.96'
  45. $("#recv_ipt").bind('input propertychange', function (e) {
  46. var ipt_phones = $('#recv_ipt').val();
  47. var c = $(this);
  48. if (/[^\d]/.test(c.val())) {//替换非数字字符
  49. var temp_amount = c.val().replace(/[^\d]/g, '');
  50. $(this).val(temp_amount);
  51. toastr.error('请填写正确的手机号')
  52. }
  53. if (ipt_phones.length >= 12) {
  54. toastr.error('请填写正确的手机号')
  55. var recvstr = ipt_phones.substring(0, 11)
  56. $("#recv_ipt").val(recvstr);
  57. }
  58. });
  59. function handleClick() {
  60. var time = new Date().getTime()
  61. var data = {}
  62. toastr.options = {
  63. positionClass: "toast-center-center"
  64. };
  65. var ipt_phone = $('#recv_ipt').val();
  66. var validator = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
  67. var res = validator.test(ipt_phone)
  68. if (!ipt_phone) {
  69. toastr.error('请填写正确的手机号')
  70. } else if (!res) {
  71. toastr.error('请填写正确的手机号')
  72. } else {
  73. data.newPhone = ipt_phone
  74. data.type = [[${ type }]]
  75. data.code = [[${ code }]]
  76. data.username = [[${ userName }]]
  77. $.ajax({
  78. url: baseUrl + '/promote/commitPhone',
  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. toastr.error('领取成功')
  87. $(window).attr('location', res.data);
  88. } else {
  89. toastr.error(res.msg)
  90. }
  91. }
  92. })
  93. var Sys = {};
  94. var ua = navigator.userAgent.toLowerCase();
  95. var s, browserType;
  96. (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
  97. (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
  98. (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
  99. (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
  100. (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
  101. if (Sys.ie) {
  102. browserType = 'IE: ' + Sys.ie
  103. }
  104. if (Sys.firefox) {
  105. browserType = 'Firefox: ' + Sys.firefox
  106. }
  107. if (Sys.chrome) {
  108. browserType = 'Chrome: ' + Sys.chrome
  109. }
  110. if (Sys.opera) {
  111. browserType = 'Opera: ' + Sys.opera
  112. }
  113. if (Sys.safari) {
  114. browserType = 'Safari: ' + Sys.safari
  115. }
  116. var form = {
  117. platform: 4,
  118. visitType: 4,
  119. time: time,
  120. phoneNum: ipt_phone,
  121. downLoaderCount: Number(localStorage.getItem('downLoaderCount')),
  122. browserType: browserType
  123. }
  124. var list = []
  125. list.push(form)
  126. // 推广页面下载埋点接口
  127. $.ajax({
  128. url: baseUrl + '/api/public/v4/access/user/burialSiteLog',
  129. data: JSON.stringify(list),
  130. type: 'post',
  131. contentType: "application/json",
  132. dataType: 'json',
  133. cache: false,
  134. success: function (res) {
  135. }
  136. })
  137. }
  138. }
  139. function visit() {
  140. $.ajax({
  141. url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
  142. type: 'get',
  143. cache: false,
  144. dataType: 'text',
  145. success: function () {
  146. }
  147. })
  148. }
  149. visit()
  150. </script>
  151. </body>
  152. <style>
  153. #toast-container>.toast-error {
  154. background-image: none !important;
  155. }
  156. .toast-error {
  157. background-color: rgba(0, 0, 0, 0.8);
  158. }
  159. #toast-container>div {
  160. font-size: 14px;
  161. min-width: 80px !important;
  162. padding: 12px !important;
  163. box-shadow: none;
  164. }
  165. @media (max-width: 480px) and (min-width: 241px) {
  166. #toast-container>div {
  167. min-width: 80px !important;
  168. width: auto;
  169. }
  170. }
  171. @media only screen and (min-width: 640px) {
  172. .toast-center-center {
  173. top: 50%;
  174. left: 50%;
  175. transform: translate(-50%, -50%);
  176. }
  177. }
  178. @media only screen and (max-width: 640px) {
  179. .toast-center-center {
  180. top: 50%;
  181. left: 50%;
  182. transform: translate(-50%, -50%);
  183. }
  184. }
  185. input::-webkit-input-placeholder {
  186. color: #BBBBBB;
  187. }
  188. input::-moz-placeholder {
  189. /* Mozilla Firefox 19+ */
  190. color: #BBBBBB;
  191. }
  192. input:-moz-placeholder {
  193. /* Mozilla Firefox 4 to 18 */
  194. color: #BBBBBB;
  195. }
  196. input:-ms-input-placeholder {
  197. /* Internet Explorer 10-11 */
  198. color: #BBBBBB;
  199. }
  200. </style>
  201. </html>