register.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362
  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. <link rel="stylesheet" href="../static/css/verify.css">
  13. <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
  14. <script src="../static/js/vender/bootstrap/js/bootstrap.min.js"></script>
  15. <script src="../static/js/vender/toastr/toastr.min.js"></script>
  16. <script src="../static/js/vender/config.js"></script>
  17. <script src="../static/js/vender/crypto-js.js"></script>
  18. <script src="../static/js/vender/base64.js"></script>
  19. <script src="../static/js/vender/verify.js"></script>
  20. <script src="../static/js/vender/ase.js"></script>
  21. <script>
  22. toastr.options.positionClass = 'toast-center-center';
  23. </script>
  24. <style>
  25. .my-tips{
  26. position: fixed;
  27. top: 50%;
  28. left: 50%;
  29. transform: translate(-50%, -50%);
  30. font-size: 0.28rem;
  31. }
  32. </style>
  33. </head>
  34. <body>
  35. <div class="my-tips">当前功能维护中,暂无法使用</div>
  36. <!-- <div id="mpanel2"></div>
  37. <div id="form-btn"></div>
  38. <div class="top free-code-con" style="position:relative;">
  39. <div>
  40. <img src="../static/img/register/bg.png" alt="" class="bottom-img">
  41. <div class="user-info">
  42. <div class="head"><img src="" alt="" /></div>
  43. <div class="username"></div>
  44. <div class="txt">
  45. <div style="width: 2.97rem;"><img src="../static/img/register/tuoguan_icon.png" class="icon" alt="">7*24h智能托管
  46. </div>
  47. <div style="width: 1.76rem;"><img src="../static/img/register/haodian_icon.png" class="icon" alt="">0耗电</div>
  48. <div><img src="../static/img/register/liuliang_icon.png" class="icon" alt="">0流量</div>
  49. <div style="width: 2.97rem;"><img src="../static/img/register/wang_icon.png" class="icon" alt="">应用 24h 不断网
  50. </div>
  51. <div><img src="../static/img/register/shou_icon.png" class="icon" alt="">解放双手</div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="center-pic">
  56. <div class="recv-cont" id="recv_cont">
  57. <div class="recv-wrap" style="position: relative;">
  58. <input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
  59. <div class="tip">该手机号仅用于验证并绑定账号</div>
  60. </div>
  61. <div onclick="handleClick()" style="position: relative">
  62. <div class="recv-btn" id="recv_btn">立即加入</div>
  63. </div>
  64. <div class="bottom">
  65. <div class="mb8">双子星</div>
  66. <div class="wl">云智能 · 享未来</div>
  67. </div>
  68. </div>
  69. </div>
  70. </div> -->
  71. <!-- <script type="text/javascript" th:inline="javascript">
  72. var parameters = GetRequest();
  73. var phone = parameters["phone"];
  74. var timer, flag = true;
  75. var html = document.documentElement;
  76. var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
  77. var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
  78. var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
  79. $("#recv_ipt").val(phone ? phone : '');
  80. $("#recv_ipt").bind('input propertychange', function (e) {
  81. var ipt_phones = $('#recv_ipt').val();
  82. var c = $(this);
  83. if (/[^\d]/.test(c.val())) {//替换非数字字符
  84. var temp_amount = c.val().replace(/[^\d]/g, '');
  85. $(this).val(temp_amount);
  86. stopManyClick(() => {
  87. toastr.error('请填写正确的手机号')
  88. })
  89. }
  90. if (ipt_phones.length >= 12) {
  91. var recvstr = ipt_phones.substring(0, 11)
  92. $("#recv_ipt").val(recvstr);
  93. stopManyClick(() => {
  94. toastr.error('请填写正确的手机号')
  95. })
  96. }
  97. });
  98. visit();
  99. getUserInfo();
  100. function validate() {
  101. $('#mpanel2').slideVerify({
  102. baseUrl: baseUrl + '/api/activity', //服务器请求地址, 默认地址为安吉服务器;
  103. mode: 'pop', //展示模式
  104. containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
  105. imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
  106. width: imgWidth,
  107. height: imgHeight
  108. },
  109. barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
  110. width: imgWidth,
  111. height: barHeight
  112. },
  113. beforeCheck: () => {
  114. return true
  115. },
  116. ready: () => {
  117. }, //加载完毕的回调
  118. success: (params) => { //成功的回调
  119. setTimeout(() => {
  120. submit(params.captchaVerification);
  121. }, 1000)
  122. },
  123. error: function () { }
  124. });
  125. }
  126. function submit(captchaVerification) {
  127. var data = {}
  128. data.userName = parameters['username'] ? parameters['username'] : null
  129. data.type = parameters['type'] ? parameters['type'] : null
  130. data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
  131. data.newPhone = $('#recv_ipt').val();
  132. data.captchaVerification = captchaVerification;
  133. $.ajax({
  134. url: baseUrl + '/api/activity/v1/promote',
  135. data: JSON.stringify(data),
  136. type: 'post',
  137. contentType: "application/json",
  138. dataType: 'json',
  139. cache: false,
  140. success: function (res) {
  141. if (res.status === 0) {
  142. toastr.error('领取成功')
  143. $(window).attr('location', res.data);
  144. } else if (res.status === 1) {
  145. toastr.error(res.msg)
  146. setTimeout(function () {
  147. if (baseUrl.includes('prese.phone.androidscloud.com')) {
  148. $(window).attr('location', 'http://14.18.190.144:18888');
  149. } else {
  150. $(window).attr('location', 'http://www.androidscloud.com');
  151. }
  152. }, 1000)
  153. } else if (res.status === 11) {
  154. $('#mpanel2').eq(0).text('');
  155. validate(); // 生成验证码
  156. setTimeout(() => {
  157. document.getElementById('form-btn').click();
  158. }, 500)
  159. } else {
  160. toastr.error(res.msg)
  161. }
  162. }
  163. })
  164. }
  165. function getUserInfo() {
  166. var userName = parameters['username'] ? parameters['username'] : null
  167. userName = Base64.decode(userName)
  168. $.ajax({
  169. url: baseUrl + '/api/activity/v3/invitation/getNickname?username=' + userName,
  170. type: 'get',
  171. cache: false,
  172. dataType: 'text',
  173. success: function (res) {
  174. var result = JSON.parse(res)
  175. if (result.status === 0) {
  176. $(".username").text(result.data.nickName)
  177. getHead(result.data.fileId)
  178. }
  179. }
  180. })
  181. }
  182. function getHead(fileId) {
  183. $('.head img').attr('src', '../static/img/invite/header-img.png');
  184. if (fileId) {
  185. let urls = baseUrl == 'http://prese.phone.androidscloud.com' ? 'http://110.53.221.195:8210' : 'https://wjzx.androidscloud.com:9091';
  186. $('.head img').attr('src', `${urls}/document/newFile/download/0/347905r86eb745a1sc38?fileKey=` + fileId);
  187. }
  188. }
  189. function encrypt(word, keyStr) {
  190. keyStr = keyStr || 'RuiChiSecurityGo' // 判断是否存在ksy,不存在就用定义好的key
  191. var key = CryptoJS.enc.Utf8.parse(keyStr)
  192. var srcs = CryptoJS.enc.Utf8.parse(word)
  193. var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
  194. return encrypted.toString()
  195. }
  196. function handleClick() {
  197. stopManyClick(result);
  198. }
  199. function result() {
  200. var time = new Date().getTime()
  201. var data = {}
  202. data.userName = parameters['username'] ? parameters['username'] : null
  203. data.type = parameters['type'] ? parameters['type'] : null
  204. data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
  205. toastr.options = {
  206. positionClass: "toast-center-center",
  207. timeOut: 1500
  208. };
  209. var ipt_phone = $('#recv_ipt').val();
  210. var validator = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
  211. var res = validator.test(ipt_phone)
  212. var downLoaderCount = Number(localStorage.getItem('downLoaderCount'))
  213. downLoaderCount ? localStorage.setItem('downLoaderCount', downLoaderCount + 1) : localStorage.setItem('downLoaderCount', 1)
  214. if (!ipt_phone) {
  215. stopManyClick(() => {
  216. toastr.error('请填写正确的手机号')
  217. })
  218. } else if (!res) {
  219. stopManyClick(() => {
  220. toastr.error('请填写正确的手机号')
  221. })
  222. } else {
  223. data.newPhone = ipt_phone
  224. $.ajax({
  225. url: baseUrl + '/api/activity/v1/promote',
  226. data: JSON.stringify(data),
  227. type: 'post',
  228. contentType: "application/json",
  229. dataType: 'json',
  230. cache: false,
  231. success: function (res) {
  232. if (res.status === 0) {
  233. toastr.error('领取成功')
  234. $(window).attr('location', res.data);
  235. } else if (res.status === 1) {
  236. toastr.error(res.msg)
  237. setTimeout(function () {
  238. $(window).attr('location', 'http://www.androidscloud.com/');
  239. }, 1000)
  240. } else if (res.status === '0011') {
  241. $('#mpanel2').eq(0).text('');
  242. validate(); // 生成验证码
  243. setTimeout(() => {
  244. document.getElementById('form-btn').click();
  245. }, 500)
  246. } else {
  247. toastr.error(res.msg)
  248. }
  249. }
  250. })
  251. }
  252. }
  253. // 邀请好友页面访问量统计埋点接口(仅分享好友下载页面调用)
  254. function visit() {
  255. $.ajax({
  256. url: baseUrl + '/api/user/v5/operateApi/addUserVisit',
  257. type: 'post',
  258. data: JSON.stringify({ "accessType": 2, "loginType": 2 }),
  259. contentType:"application/json",
  260. dataType: 'json',
  261. cache: false,
  262. success: function () {
  263. }
  264. })
  265. }
  266. // function visit() {
  267. // $.ajax({
  268. // url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
  269. // type: 'get',
  270. // cache: false,
  271. // dataType: 'text',
  272. // success: function () {
  273. // }
  274. // })
  275. // }
  276. //防止提示一秒内重复显示
  277. function stopManyClick(fn) {
  278. if (flag) {
  279. fn();
  280. }
  281. flag = false;
  282. if (timer) { clearTimeout(timer); }
  283. timer = setTimeout(() => { flag = true }, 1500);
  284. }
  285. </script> -->
  286. </body>
  287. <style>
  288. #toast-container>.toast-error {
  289. background-image: none !important;
  290. }
  291. .toast-error {
  292. background-color: rgba(0, 0, 0, 0.8);
  293. }
  294. #toast-container>div {
  295. font-size: 14px;
  296. min-width: 80px !important;
  297. padding: 12px !important;
  298. box-shadow: none;
  299. }
  300. .toast-center-center {
  301. position: fixed;
  302. min-width: 220px;
  303. top: 50%;
  304. left: 50%;
  305. text-align: center;
  306. transform: translateX(-50%);
  307. color: #FFFFFF;
  308. border-radius: 0.2rem;
  309. }
  310. @media (max-width: 480px) and (min-width: 241px) {
  311. #toast-container>div {
  312. min-width: 80px !important;
  313. width: auto;
  314. }
  315. }
  316. @media only screen and (min-width: 640px) {
  317. .toast-center-center {
  318. top: 50%;
  319. left: 50%;
  320. transform: translate(-50%, -50%);
  321. }
  322. }
  323. @media only screen and (max-width: 640px) {
  324. .toast-center-center {
  325. top: 50%;
  326. left: 50%;
  327. transform: translate(-50%, -50%);
  328. }
  329. }
  330. input::-webkit-input-placeholder {
  331. color: #BBBBBB;
  332. }
  333. input::-moz-placeholder {
  334. /* Mozilla Firefox 19+ */
  335. color: #BBBBBB;
  336. }
  337. input:-moz-placeholder {
  338. /* Mozilla Firefox 4 to 18 */
  339. color: #BBBBBB;
  340. }
  341. input:-ms-input-placeholder {
  342. /* Internet Explorer 10-11 */
  343. color: #BBBBBB;
  344. }
  345. </style>
  346. </html>