123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303 |
- <!DOCTYPE html>
- <html lang="en" xmlns:th="http://www.thymeleaf.org">
- <head>
- <meta charset="UTF-8">
- <title>双子星</title>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="icon" href="../static/img/favicon2.ico" type="img/x-ico">
- <link rel="stylesheet" href="../static/js/vender/bootstrap/css/bootstrap.min.css">
- <link rel="stylesheet" href="../static/css/normalize.css">
- <link rel="stylesheet" href="../static/css/experience.css">
- <link rel="stylesheet" href="../static/js/vender/toastr/toastr.min.css">
- <script src="../static/js/vender/jquery-3.4.1.min.js"></script>
- <script src="../static/js/vender/bootstrap/js/bootstrap.min.js"></script>
- <script src="../static/js/vender/toastr/toastr.min.js"></script>
- <script src="../static/js/vender/crypto-js.js"></script>
- <script src="../static/js/vender/base64.js"></script>
- <script>
- toastr.options.positionClass = 'toast-center-center';
- </script>
- </head>
- <body>
- <div class="top free-code-con" style="position:relative;">
- <div>
- <img src="../static/img/bg.png" alt="" class="bottom-img">
- <div class="user-info">
- <div class="head"><img src="" alt="" /></div>
- <div class="username"></div>
- <div class="txt">
- <div style="width: 2.97rem;"><img src="../static/img/register/tuoguan_icon.png" class="icon" alt="">7*24h智能托管</div>
- <div style="width: 1.76rem;"><img src="../static/img/register/haodian_icon.png" class="icon" alt="">0耗电</div>
- <div><img src="../static/img/register/liuliang_icon.png" class="icon" alt="">0流量</div>
- <div style="width: 2.97rem;"><img src="../static/img/register/wang_icon.png" class="icon" alt="">应用24h 不断网</div>
- <div style="width: 1.76rem;"><img src="../static/img/register/shou_icon.png" class="icon" alt="">解放双手</div>
- </div>
- </div>
- </div>
- <div class="center-pic">
- <div class="recv-cont" id="recv_cont">
- <div style="position: relative;">
- <input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
- </div>
- <div onclick="handleClick()" style="position: relative">
- <div class="recv-btn" id="recv_btn">立即加入</div>
- </div>
- <div class="bottom">
- <div class="mb8">双子星</div>
- <div class="wl">云智能 · 享未来</div>
- </div>
- </div>
- </div>
- </div>
- <script type="text/javascript" th:inline="javascript">
- var url = window.location.href;
- url = url.split('/')
- // var baseUrl = 'http://' + url[2]
- var baseUrl = 'http://14.215.128.96'
- $("#recv_ipt").bind('input propertychange', function (e) {
- var ipt_phones = $('#recv_ipt').val();
- var c = $(this);
- if (/[^\d]/.test(c.val())) {//替换非数字字符
- var temp_amount = c.val().replace(/[^\d]/g, '');
- $(this).val(temp_amount);
- toastr.error('请填写正确的手机号')
- }
- if (ipt_phones.length >= 12) {
- toastr.error('请填写正确的手机号')
- var recvstr = ipt_phones.substring(0, 11)
- $("#recv_ipt").val(recvstr);
- }
- });
- function getUserInfo() {
- var userName = [[${ userName }]]
- userName = Base64.decode(userName)
- $.ajax({
- url: baseUrl + '/api/user/v3/invitation/getNickname?username=' + userName,
- type: 'get',
- cache: false,
- dataType: 'text',
- success: function (res) {
- var result = JSON.parse(res)
- if (result.status === 0) {
- $(".username").text(result.data.nickName)
- getHead(result.data.fileId)
- }
- }
- })
- }
- function getHead(fileId) {
- $('.head img').attr('src', '../static/img/invite/header-img.png');
- var timestamp = new Date().getTime()
- var encrypts = encrypt(
- 'RuiChiSecurityGo' + timestamp,
- 'RuiChiSecurityGo'
- )
- var data = {
- keyType: 2,
- security: encrypts
- }
- $.ajax({
- url: 'https://wjzx.androidscloud.com:9091/file-center/fileOperate/getImage?id=' + fileId,
- type: 'get',
- headers: data,
- xhrFields: { responseType: "blob" },
- cache: false,
- success: function (res) {
- var xhr = new XMLHttpRequest();
- var imageType = xhr.getResponseHeader("Content-Type");
- var blob = new Blob([res], { type: imageType });
- var imageUrl = (window.URL || window.webkitURL).createObjectURL(blob);
- $('.head img').attr('src', imageUrl);
- }
- })
- }
- function encrypt(word, keyStr) {
- keyStr = keyStr || 'RuiChiSecurityGo' // 判断是否存在ksy,不存在就用定义好的key
- var key = CryptoJS.enc.Utf8.parse(keyStr)
- var srcs = CryptoJS.enc.Utf8.parse(word)
- var encrypted = CryptoJS.AES.encrypt(srcs, key, { mode: CryptoJS.mode.ECB, padding: CryptoJS.pad.Pkcs7 })
- return encrypted.toString()
- }
- getUserInfo();
- function handleClick() {
- stopManyClick(result);
- }
- function result() {
- var time = new Date().getTime()
- var data = {}
- toastr.options = {
- positionClass: "toast-center-center"
- };
- var ipt_phone = $('#recv_ipt').val();
- var validator = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/
- var res = validator.test(ipt_phone)
- if (!ipt_phone) {
- toastr.error('请填写正确的手机号')
- } else if (!res) {
- toastr.error('请填写正确的手机号')
- } else {
- data.newPhone = ipt_phone
- data.type = [[${ type }]]
- data.code = [[${ code }]]
- data.username = [[${ userName }]]
- $.ajax({
- url: baseUrl + '/promote/commitPhone',
- data: JSON.stringify(data),
- type: 'post',
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- if (res.status === 0) {
- toastr.error('领取成功')
- $(window).attr('location', res.data);
- } else if (res.status === 1) {
- toastr.error(res.msg)
- setTimeout(function () {
- $(window).attr('location', 'http://www.androidscloud.com/');
- }, 1000)
- } else {
- toastr.error(res.msg)
- }
- }
- })
- var Sys = {};
- var ua = navigator.userAgent.toLowerCase();
- var s, browserType;
- (s = ua.match(/msie ([\d.]+)/)) ? Sys.ie = s[1] :
- (s = ua.match(/firefox\/([\d.]+)/)) ? Sys.firefox = s[1] :
- (s = ua.match(/chrome\/([\d.]+)/)) ? Sys.chrome = s[1] :
- (s = ua.match(/opera.([\d.]+)/)) ? Sys.opera = s[1] :
- (s = ua.match(/version\/([\d.]+).*safari/)) ? Sys.safari = s[1] : 0;
- if (Sys.ie) {
- browserType = 'IE: ' + Sys.ie
- }
- if (Sys.firefox) {
- browserType = 'Firefox: ' + Sys.firefox
- }
- if (Sys.chrome) {
- browserType = 'Chrome: ' + Sys.chrome
- }
- if (Sys.opera) {
- browserType = 'Opera: ' + Sys.opera
- }
- if (Sys.safari) {
- browserType = 'Safari: ' + Sys.safari
- }
- var form = {
- platform: 4,
- visitType: 4,
- time: time,
- phoneNum: ipt_phone,
- downLoaderCount: Number(localStorage.getItem('downLoaderCount')),
- browserType: browserType
- }
- var list = []
- list.push(form)
- // 推广页面下载埋点接口
- $.ajax({
- url: baseUrl + '/promote/burialSiteLog',
- data: JSON.stringify(list),
- type: 'post',
- contentType: "application/json",
- dataType: 'json',
- cache: false,
- success: function (res) {
- }
- })
- }
- }
- function visit() {
- $.ajax({
- url: baseUrl + '/promote/addInviteData',
- type: 'get',
- cache: false,
- dataType: 'text',
- success: function () {
- }
- })
- }
- visit();
- //防止提示一秒内重复显示
- function stopManyClick(fn) {
- if (flag) {
- fn();
- }
- flag = false;
- if (timer) { clearTimeout(timer); }
- timer = setTimeout(function () { flag = true }, 1500);
- }
- </script>
- </body>
- <style>
- #toast-container>.toast-error {
- background-image: none !important;
- }
- .toast-error {
- background-color: rgba(0, 0, 0, 0.8);
- }
- #toast-container>div {
- font-size: 14px;
- min-width: 80px !important;
- padding: 12px !important;
- box-shadow: none;
- }
- @media (max-width: 480px) and (min-width: 241px) {
- #toast-container>div {
- min-width: 80px !important;
- width: auto;
- }
- }
- @media only screen and (min-width: 640px) {
- .toast-center-center {
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- @media only screen and (max-width: 640px) {
- .toast-center-center {
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- }
- input::-webkit-input-placeholder {
- color: #BBBBBB;
- }
- input::-moz-placeholder {
- /* Mozilla Firefox 19+ */
- color: #BBBBBB;
- }
- input:-moz-placeholder {
- /* Mozilla Firefox 4 to 18 */
- color: #BBBBBB;
- }
- input:-ms-input-placeholder {
- /* Internet Explorer 10-11 */
- color: #BBBBBB;
- }
- </style>
- </html>
|