official.html 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  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.0, maximum-scale=1.0, user-scalable=0">
  7. <link rel="icon" href="../static/offImg/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/offMain.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. window.onload = window.onresize = function () {
  18. verticalAlign()
  19. }
  20. function verticalAlign() {
  21. // alert($('body').css('font-size'));
  22. var logo_w = $('body').width();
  23. var logo_t = $('#bottom_img').height() * 0.05;
  24. if (logo_w <= 640) {
  25. $('#logo').css('top', '50px');
  26. $('#logo').width('25%');
  27. } else {
  28. $('#logo').css('top', logo_t);
  29. $('#logo').width(logo_w * 0.1178);
  30. }
  31. var ipt_w = $('#recv_ipt').width();
  32. var ipt_h = ipt_w * 0.18;
  33. var font_sz = ipt_w * 0.06 + 'px';
  34. $('#recv_ipt').height(ipt_h);
  35. $('#recv_ipt').css('font-size', font_sz);
  36. $('#recv_btn').css('font-size', font_sz);
  37. $('#recv_btn2').css('font-size', font_sz);
  38. // $('#recv_ipt').css('line-height', ipt_h);
  39. $('#icon').height(ipt_h);
  40. var icon_w = $('#recv_cont').width() * 0.053333
  41. $('#icon').width(icon_w);
  42. var icon_t = 'calc(' + ipt_h / 6 + 'px' + ' + 3rem)';
  43. $('#icon').css('top', icon_t);
  44. $('#recv_btn').css('padding', ipt_w * 0.01 + 'px');
  45. $('#recv_btn2').css('padding', ipt_w * 0.01 + 'px');
  46. var btn_h = $('#recv_ipt').height() - ipt_w * 0.01;
  47. $('#recv_btn').height(btn_h);
  48. $('#recv_btn2').height(btn_h);
  49. }
  50. </script>
  51. <script>
  52. toastr.options.positionClass = 'toast-center-center';
  53. </script>
  54. </head>
  55. <body>
  56. <header>
  57. <div class="top free-code-con" style="position:relative;">
  58. <div>
  59. <div>
  60. <picture>
  61. <source media="(max-width: 640px)" srcset="../static/offImg/p01.png 640w" />
  62. <source media="(min-width: 640px)" srcset="../static/offImg/01.png 1366w" />
  63. <img src="../static/offImg/01.png" alt="" class="bottom-img" id="bottom_img">
  64. </picture>
  65. </div>
  66. <div class="top-tip-con">
  67. <span>双子星</span>
  68. <span class="font-right">来自云端的云手机</span>
  69. </div>
  70. <div class="center-pic">
  71. <div class="recv-cont" id="recv_cont">
  72. <div style="position: relative;">
  73. <input type="text" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号领取激活码">
  74. </div>
  75. <div onclick="handleClick()" style="position: relative">
  76. <img src="../static/offImg/tuiguang_anniu_icon.png" alt="" class="recv-btn"
  77. style="position: relative;">
  78. <span
  79. style="position: absolute;top:53%;left: 50%;transform: translate(-50%,-50%);font-size: 28px;color: #ffffff;letter-spacing:2px;text-shadow:0px 1px 4px rgba(168,13,9,0.65);">立即领取</span>
  80. </div>
  81. <!-- <button type="button" class="bun btn-primary btn-lg recv-btn" id="recv_btn" onclick="handleClick()"-->
  82. <!-- >点击获取</button>-->
  83. </div>
  84. <div class="load-menu">
  85. <div style="text-align: center">
  86. <img src="../static/offImg/zuo_icon@2x.png" alt="" class="code-tip-icon">
  87. <span class="code-tip-font">激活码领取规则</span>
  88. <img src="../static/offImg/you_icon@2x.png" alt="" class="code-tip-icon">
  89. </div>
  90. <div class="tb-codes" id="tb_codes">
  91. <div class="tb-con">
  92. <p>1.使用手机号码注册双子星云手机账号</p>
  93. <p>下载地址:</p>
  94. <p>(1)关注微信公众号:双子星情报局,点击菜单栏中的【自助服务】→选择【下载app】进行下载安装。</p>
  95. <p>(2)官网下载:http://www.androidscloud.com/</p>
  96. <p>2.在上方填写双子星云手机注册手机号,即可免费领取双子星云手机激活码</p>
  97. <br>
  98. <p>激活码使用方法</p>
  99. <p>1.在双子星云手机注册并登录账号</p>
  100. <p>2.登录后,点击右下方【我的】</p>
  101. <p>3.在【我的】界面点击【激活码】进入兑换界面</p>
  102. <p>4.输入激活码,即可获得相应星币、套餐、优惠券等</p>
  103. <br>
  104. </div>
  105. </div>
  106. <!-- <span class="tb-font">手机扫码下载</span>-->
  107. <!-- <button type="button" class="bun btn-primary btn-lg recv-btn" id="recv_btn2" onclick="handleDownload()">点击下载-->
  108. <!-- </button>-->
  109. </div>
  110. </div>
  111. </div>
  112. </div>
  113. <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
  114. aria-hidden="true">
  115. <div class="modal-dialog tip-suc-con">
  116. <div class="modal-content">
  117. <div class="tip-suc-title">领取成功</div>
  118. <div class="modal-body tip-suc-context">
  119. 激活码将以短信的形式发送至领取手机号,请留意短信。
  120. </div>
  121. <button type="button" class="btn btn-default tip-suc-btn" data-dismiss="modal">知道了</button>
  122. </div>
  123. </div>
  124. </div>
  125. </header>
  126. <script type="text/javascript" th:inline="javascript">
  127. var url = window.location.href;
  128. url = url.split('/')
  129. $("#recv_ipt").bind('input propertychange', function (e) {
  130. var ipt_phones = $('#recv_ipt').val();
  131. var c = $(this);
  132. if (/[^\d]/.test(c.val())) {//替换非数字字符
  133. var temp_amount = c.val().replace(/[^\d]/g, '');
  134. $(this).val(temp_amount);
  135. toastr.error('请输入正确的手机号')
  136. }
  137. if (ipt_phones.length >= 12) {
  138. toastr.error('请输入正确的手机号')
  139. var recvstr = ipt_phones.substring(0, 11)
  140. $("#recv_ipt").val(recvstr);
  141. }
  142. });
  143. function handleClick() {
  144. var urlData = window.location.search.split('=')[1]
  145. toastr.options = {
  146. positionClass: "toast-center-center"
  147. };
  148. var ipt_phone = $('#recv_ipt').val();
  149. var validator = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
  150. var res = validator.test(ipt_phone)
  151. if (!ipt_phone) {
  152. toastr.error('请输入正确的手机号')
  153. } else if (!res) {
  154. toastr.error('请输入正确的手机号')
  155. } else {
  156. $.ajax({
  157. url: baseUrl + '/api/pay/v1/officialAccount/autoActivationCode/getCode',
  158. data: JSON.stringify({
  159. urlNo: urlData,
  160. phone: ipt_phone
  161. }),
  162. type: 'post',
  163. contentType: "application/json",
  164. dataType: 'json',
  165. cache: false,
  166. success: function (res) {
  167. if (res.status === 0) {
  168. $('#myModal').modal('show')
  169. } else {
  170. toastr.error(res.msg)
  171. }
  172. }
  173. })
  174. }
  175. }
  176. /*
  177. function handleDownload() {
  178. $.ajax({
  179. url: baseUrl + '/api/user/promote/webUrl',
  180. type: 'get',
  181. cache: false,
  182. dataType: 'text',
  183. success: function (data) {
  184. var uri;
  185. if (data.startsWith('http')) {
  186. uri = data
  187. } else {
  188. uri = 'http://' + data
  189. }
  190. $(window).attr('location',uri);
  191. }
  192. })
  193. }
  194. */
  195. </script>
  196. </body>
  197. <style>
  198. #toast-container>.toast-error {
  199. background-image: none !important;
  200. }
  201. .toast-error {
  202. background-color: rgba(0, 0, 0, 0.8);
  203. }
  204. #toast-container>div {
  205. min-width: 80px !important;
  206. padding: 8px 15px !important;
  207. }
  208. @media (max-width: 480px) and (min-width: 241px) {
  209. #toast-container>div {
  210. min-width: 80px !important;
  211. width: auto;
  212. }
  213. }
  214. @media only screen and (min-width: 640px) {
  215. .toast-center-center {
  216. top: 30%;
  217. left: 55%;
  218. margin-top: -50px;
  219. margin-left: -150px;
  220. }
  221. }
  222. @media only screen and (max-width: 640px) {
  223. .toast-center-center {
  224. top: 30%;
  225. left: 50%;
  226. margin-top: -50px;
  227. margin-left: -80px;
  228. }
  229. }
  230. </style>
  231. </html>