huangxiaojing лет назад: 3
Родитель
Сommit
a26dda01e0
1 измененных файлов с 315 добавлено и 312 удалено
  1. 315 312
      microserviceUserH5/vcloud/register.html

+ 315 - 312
microserviceUserH5/vcloud/register.html

@@ -2,342 +2,345 @@
 <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">
-	<link rel="stylesheet" href="../static/css/verify.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/config.js"></script>
-	<script src="../static/js/vender/crypto-js.js"></script>
-	<script src="../static/js/vender/base64.js"></script>
-	<script src="../static/js/vender/verify.js"></script>
-	<script src="../static/js/vender/ase.js"></script>
-	<script>
-		toastr.options.positionClass = 'toast-center-center';
-	</script>
+  <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">
+  <link rel="stylesheet" href="../static/css/verify.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/config.js"></script>
+  <script src="../static/js/vender/crypto-js.js"></script>
+  <script src="../static/js/vender/base64.js"></script>
+  <script src="../static/js/vender/verify.js"></script>
+  <script src="../static/js/vender/ase.js"></script>
+  <script>
+    toastr.options.positionClass = 'toast-center-center';
+  </script>
 </head>
 
 <body>
-	<div id="mpanel2"></div>
-    <div id="form-btn"></div>
-	<div class="top free-code-con" style="position:relative;">
-		<div>
-			<img src="../static/img/register/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><img src="../static/img/register/shou_icon.png" class="icon" alt="">解放双手</div>
-				</div>
-			</div>
-		</div>
+  <div id="mpanel2"></div>
+  <div id="form-btn"></div>
+  <div class="top free-code-con" style="position:relative;">
+    <div>
+      <img src="../static/img/register/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><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 class="recv-wrap" style="position: relative;">
-					<input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
-					<div class="tip">该手机号仅用于验证并绑定账号</div>
-				</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 parameters = GetRequest();
-		var phone = parameters["phone"];
-		var timer, flag = true;
-		var html = document.documentElement;
-		var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
-		var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
-		var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
-        // var baseUrl = 'http://14.18.190.141:24380'
-		$("#recv_ipt").val(phone ? phone : '');
-		$("#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);
-				stopManyClick(() =>{
-					toastr.error('请填写正确的手机号')
-				})
-			}
-			if (ipt_phones.length >= 12) {
-				var recvstr = ipt_phones.substring(0, 11)
-				$("#recv_ipt").val(recvstr);
-				stopManyClick(() =>{
-					toastr.error('请填写正确的手机号')
-				})
-			}
-		});
+    <div class="center-pic">
+      <div class="recv-cont" id="recv_cont">
+        <div class="recv-wrap" style="position: relative;">
+          <input type="tel" class="recv-ipt" id="recv_ipt" placeholder="请输入手机号码">
+          <div class="tip">该手机号仅用于验证并绑定账号</div>
+        </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 parameters = GetRequest();
+    var phone = parameters["phone"];
+    var timer, flag = true;
+    var html = document.documentElement;
+    var imgWidth = html.getBoundingClientRect().width / 750 * 400 + 'px';
+    var imgHeight = html.getBoundingClientRect().width / 750 * 200 + 'px';
+    var barHeight = html.getBoundingClientRect().width / 750 * 70 + 'px';
+    // var baseUrl = 'http://14.18.190.141:24380'
+    $("#recv_ipt").val(phone ? phone : '');
+    $("#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);
+        stopManyClick(() => {
+          toastr.error('请填写正确的手机号')
+        })
+      }
+      if (ipt_phones.length >= 12) {
+        var recvstr = ipt_phones.substring(0, 11)
+        $("#recv_ipt").val(recvstr);
+        stopManyClick(() => {
+          toastr.error('请填写正确的手机号')
+        })
+      }
+    });
 
-		function validate() {
-			$('#mpanel2').slideVerify({
-				baseUrl: baseUrl + '/api/activity',  //服务器请求地址, 默认地址为安吉服务器;
-				mode: 'pop',     //展示模式
-				containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
-				imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
-					width: imgWidth,
-					height: imgHeight
-				},
-				barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
-					width: imgWidth,
-					height: barHeight
-				},
-				beforeCheck: () => {
-					return true
-				},
-				ready:  () => { 
-				},  //加载完毕的回调
-				success: (params) => { //成功的回调
-					setTimeout(() => {
-						submit(params.captchaVerification);
-					},1000)
-				},
-				error: function () {}
-			});
-		}
+    function validate() {
+      $('#mpanel2').slideVerify({
+        baseUrl: baseUrl + '/api/activity',  //服务器请求地址, 默认地址为安吉服务器;
+        mode: 'pop',     //展示模式
+        containerId: 'form-btn', //pop模式 必填 被点击之后出现行为验证码的元素id
+        imgSize: { //图片的大小对象,有默认值{ width: '310px',height: '155px'},可省略
+          width: imgWidth,
+          height: imgHeight
+        },
+        barSize: {//下方滑块的大小对象,有默认值{ width: '310px',height: '50px'},可省略
+          width: imgWidth,
+          height: barHeight
+        },
+        beforeCheck: () => {
+          return true
+        },
+        ready: () => {
+        },  //加载完毕的回调
+        success: (params) => { //成功的回调
+          setTimeout(() => {
+            submit(params.captchaVerification);
+          }, 1000)
+        },
+        error: function () { }
+      });
+    }
 
-		function submit(captchaVerification){
-			var data = {}
-			data.userName = parameters['username'] ? parameters['username'] : null
-			data.type = parameters['type'] ? parameters['type'] : null
-			data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
-			data.newPhone = $('#recv_ipt').val();
-			data.captchaVerification = captchaVerification;
-			$.ajax({
-				url: baseUrl + '/api/activity/v1/promote',
-				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() {
-							if(baseUrl.includes('14.18.190.141')){
-								$(window).attr('location', 'http://14.18.190.141:28888');
-							}else{
-								$(window).attr('location', 'http://www.androidscloud.com/');
-							}
-						}, 1000)
-					} else if(res.status === 11){
-						$('#mpanel2').eq(0).text('');
-						validate(); // 生成验证码
-						setTimeout(() => {
-							document.getElementById('form-btn').click();
-						},500)
-					} else {
-						toastr.error(res.msg)
-					}
-				}
-			})
-		}
+    function submit(captchaVerification) {
+      var data = {}
+      data.userName = parameters['username'] ? parameters['username'] : null
+      data.type = parameters['type'] ? parameters['type'] : null
+      data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
+      data.newPhone = $('#recv_ipt').val();
+      data.captchaVerification = captchaVerification;
+      $.ajax({
+        url: baseUrl + '/api/activity/v1/promote',
+        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 () {
+              if (baseUrl.includes('14.18.190.141')) {
+                $(window).attr('location', 'http://14.18.190.141:28888');
+              } else {
+                $(window).attr('location', 'http://www.androidscloud.com/');
+              }
+            }, 1000)
+          } else if (res.status === 11) {
+            $('#mpanel2').eq(0).text('');
+            validate(); // 生成验证码
+            setTimeout(() => {
+              document.getElementById('form-btn').click();
+            }, 500)
+          } else {
+            toastr.error(res.msg)
+          }
+        }
+      })
+    }
 
-		function getUserInfo() {
-			var userName = parameters['username'] ? parameters['username'] : null
-			userName = Base64.decode(userName)
-			$.ajax({
-				url: baseUrl + '/api/activity/v3/invitation/getNickname?username=' + userName,
-				type: 'get',
-				cache: false,
-				dataType: 'text',
-				success: function (res) {
+    function getUserInfo() {
+      var userName = parameters['username'] ? parameters['username'] : null
+      userName = Base64.decode(userName)
+      $.ajax({
+        url: baseUrl + '/api/activity/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)
-					}
-				}
-			})
-		}
+          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');
-			if(fileId){
-				let urls = baseUrl == 'http://14.18.190.141:24380'?'http://110.53.221.195:8210':'https://wjzx.androidscloud.com:9091';
-				$('.head img').attr('src', `${urls}/document/newFile/download/0/3dn9b4585511476691c6?fileKey=`+fileId);
-			}
-		}
+    function getHead(fileId) {
+      $('.head img').attr('src', '../static/img/invite/header-img.png');
+      if (fileId) {
+        let urls = baseUrl == 'http://14.18.190.141:24380' ? 'http://110.53.221.195:8210' : 'https://wjzx.androidscloud.com:9091';
+        $('.head img').attr('src', `${urls}/document/newFile/download/0/3dn9b4585511476691c6?fileKey=` + fileId);
+      }
+    }
 
-		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()
-  	}
+    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 = {}
-			data.userName = parameters['username'] ? parameters['username'] : null
-			data.type = parameters['type'] ? parameters['type'] : null
-			data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
-			toastr.options = {
-				positionClass: "toast-center-center",
-		        timeOut: 1500
-			};
-			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)
-			var downLoaderCount = Number(localStorage.getItem('downLoaderCount'))
-			downLoaderCount ? localStorage.setItem('downLoaderCount', downLoaderCount + 1) : localStorage.setItem('downLoaderCount', 1)
-			if (!ipt_phone) {
-				stopManyClick(() =>{
-				    toastr.error('请填写正确的手机号')
-			    })
-			} else if (!res) {
-				stopManyClick(() =>{
-				    toastr.error('请填写正确的手机号')
-			    })
-			} else {
-				data.newPhone = ipt_phone
-				$.ajax({
-					url: baseUrl + '/api/activity/v1/promote',
-					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 if(res.status === '0011'){
-							$('#mpanel2').eq(0).text('');
-							validate(); // 生成验证码
-							setTimeout(() => {
-								document.getElementById('form-btn').click();
-							},500)
-						} else {
-							toastr.error(res.msg)
-						}
-					}
-				})
-			}
-		}
-		function visit() {
-			$.ajax({
-				url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
-				type: 'get',
-				cache: false,
-				dataType: 'text',
-				success: function () {
-				}
-			})
-		}
+    getUserInfo();
+    function handleClick() {
+      stopManyClick(result);
+    }
+    function result() {
+      var time = new Date().getTime()
+      var data = {}
+      data.userName = parameters['username'] ? parameters['username'] : null
+      data.type = parameters['type'] ? parameters['type'] : null
+      data.extensionType = parameters['extensionType'] ? parameters['extensionType'] : '2'
+      toastr.options = {
+        positionClass: "toast-center-center",
+        timeOut: 1500
+      };
+      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)
+      var downLoaderCount = Number(localStorage.getItem('downLoaderCount'))
+      downLoaderCount ? localStorage.setItem('downLoaderCount', downLoaderCount + 1) : localStorage.setItem('downLoaderCount', 1)
+      if (!ipt_phone) {
+        stopManyClick(() => {
+          toastr.error('请填写正确的手机号')
+        })
+      } else if (!res) {
+        stopManyClick(() => {
+          toastr.error('请填写正确的手机号')
+        })
+      } else {
+        data.newPhone = ipt_phone
+        $.ajax({
+          url: baseUrl + '/api/activity/v1/promote',
+          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 if (res.status === '0011') {
+              $('#mpanel2').eq(0).text('');
+              validate(); // 生成验证码
+              setTimeout(() => {
+                document.getElementById('form-btn').click();
+              }, 500)
+            } else {
+              toastr.error(res.msg)
+            }
+          }
+        })
+      }
+    }
+    // 邀请好友页面访问量统计埋点接口
+    function visit() {
+      $.ajax({
+        url: baseUrl + '/api/user/v3/invitation/client/addInviteData',
+        type: 'get',
+        cache: false,
+        dataType: 'text',
+        success: function () {
+        }
+      })
+    }
 
-		// visit()
-		//防止提示一秒内重复显示
-		function stopManyClick(fn) {
-			if (flag) {
-				fn();
-			}
-			flag = false;
-			if(timer){clearTimeout(timer);}
-			timer = setTimeout(() => {flag = true}, 1500);
-		}
-	</script>
+    visit()
+    //防止提示一秒内重复显示
+    function stopManyClick(fn) {
+      if (flag) {
+        fn();
+      }
+      flag = false;
+      if (timer) { clearTimeout(timer); }
+      timer = setTimeout(() => { flag = true }, 1500);
+    }
+  </script>
 </body>
 <style>
-	#toast-container>.toast-error {
-		background-image: none !important;
-	}
+  #toast-container>.toast-error {
+    background-image: none !important;
+  }
 
-	.toast-error {
-		background-color: rgba(0, 0, 0, 0.8);
-	}
+  .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;
-	}
+  #toast-container>div {
+    font-size: 14px;
+    min-width: 80px !important;
+    padding: 12px !important;
+    box-shadow: none;
+  }
 
-	.toast-center-center {
-		position: fixed;
-		min-width: 220px;
-		top: 50%;
-		left: 50%;
-		text-align: center;
-		transform: translateX(-50%);
-		color: #FFFFFF;
-		border-radius: 0.2rem;
-	}
+  .toast-center-center {
+    position: fixed;
+    min-width: 220px;
+    top: 50%;
+    left: 50%;
+    text-align: center;
+    transform: translateX(-50%);
+    color: #FFFFFF;
+    border-radius: 0.2rem;
+  }
 
-	@media (max-width: 480px) and (min-width: 241px) {
-		#toast-container>div {
-			min-width: 80px !important;
-			width: auto;
-		}
-	}
+  @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 (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%);
-		}
-	}
+  @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::-webkit-input-placeholder {
+    color: #BBBBBB;
+  }
 
-	input::-moz-placeholder {
-		/* Mozilla Firefox 19+ */
-		color: #BBBBBB;
-	}
+  input::-moz-placeholder {
+    /* Mozilla Firefox 19+ */
+    color: #BBBBBB;
+  }
 
-	input:-moz-placeholder {
-		/* Mozilla Firefox 4 to 18 */
-		color: #BBBBBB;
-	}
+  input:-moz-placeholder {
+    /* Mozilla Firefox 4 to 18 */
+    color: #BBBBBB;
+  }
 
-	input:-ms-input-placeholder {
-		/* Internet Explorer 10-11 */
-		color: #BBBBBB;
-	}
+  input:-ms-input-placeholder {
+    /* Internet Explorer 10-11 */
+    color: #BBBBBB;
+  }
 </style>
 
 </html>