official.html 7.7 KB

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