123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" />
- <meta name="misapplication-tap-highlight" content="no" />
- <meta name="HandheldFriendly" content="true" />
- <meta name="MobileOptimized" content="320" />
- <script src="https://cdn.bootcss.com/blueimp-md5/2.10.0/js/md5.js"></script>
- <script typet="text/javascript" src="http://hgd.liuniu946.com/appdom/js/JQ.js"></script>
- </head>
- <body>
- <div class="container">
- <div class="loginTitle">欢迎宏根蒂</div>
- <div class="loginText">请认真填写个人信息</div>
- <div class="login-box">
- <div class="username">账号</div>
- <input class="input-box" type="email" id="phone" name="phone" placeholder="请输入手机号" />
- </div>
- <div class="login-box" style="display:none;">
- <div class="username">验证码</div>
- <div class="flex">
- <input class="input-box" style="width: 50%" id="code" type="number" name="code"
- placeholder="请输入验证码">
- <div class="code" id="daojishi" onclick="verification()">发送验证码</div>
- </div>
- </div>
- <div class="login-box">
- <div class="username">登录密码</div>
- <input class="input-box" id="loginPass" type="password" name="loginPass" placeholder="请输入登录密码">
- </div>
- <div class="login-box">
- <div class="username">邀请码</div>
- <input class="input-box" id="invitation" type="text" disabled="disabled" name="invitation"
- placeholder="请输入邀请码">
- </div>
- <div class="flex">
- <div class="login" onclick="fnLogin()">注册</div>
- <div class="login"><a href="http://hgd.liuniu946.com/appdom/down.html">下载APP</a></div>
- </div>
- </div>
- </body>
- <script type="text/javascript">
- var url = location.search;
- if (url.indexOf("?") != -1) {
- var str = url.substr(1);
- strs = str.split("=");
- var invitation = strs[1];
- document.getElementById('invitation').value = invitation;
- }
- function fnLogin() {
- var phone = document.getElementById("phone").value;
- var loginPass = document.getElementById("loginPass").value;
- var code = document.getElementById("code").value;
- var invitation = document.getElementById("invitation").value;
- if (phone == '') {
- window.alert("请输入账号");
- return false;
- }
- if (code == '') {
- // window.alert("请输入验证码");
- // return false;
- code = '123456'
- }
- if (loginPass == '') {
- window.alert("请输入登录密码");
- return false;
- }
- // if (invitation == '') {
- // window.alert("请输入邀请码");
- // return false;
- // }
- $.ajax({
- type: "post",
- url: "http://hgd.liuniu946.com/api/register",
- data: {
- // mobile: phone,
- // captcha: code,
- // password: loginPass,
- // sharecode: invitation
- account: phone, //账号
- captcha: code, //验证码
- password: loginPass ,//密码
- spread:invitation//上级推广人
- },
- dataType: "json",
- success: function(data) {
- window.alert(data.msg);
- if (data.msg === '注册成功')
- window.location.href = "http://hgd.liuniu946.com/appdom/down.html"
- }
- });
- }
- function verification() {
- var phone = document.getElementById("phone").value;
- if (phone == '') {
- window.alert("请输入手机号");
- return false;
- }
- if (!/^1[3|4|5|6|7|8|9]\d{9}$/.test(phone)) {
- window.alert('请输入正确的手机号');
- return;
- }
- var timer = null;
- var count = 60;
- var codeText = $('#daojishi').text();
- if (codeText == '发送验证码') {
- timer = setInterval(function() {
- count--;
- $('#daojishi').text(count);
- if (count <= 0) {
- clearInterval(timer);
- $('#daojishi').text('发送验证码');
- }
- }, 1000);
- }
- if (codeText != '发送验证码') {
- return
- }
- $.ajax({
- type: "post",
- url: "http://hgd.liuniu946.com/api/sms/send",
- data: {
- mobile: phone,
- msg: '发送中',
- event: 'register'
- },
- dataType: "json",
- success: function(data) {
- window.alert(data.msg);
- }
- });
- }
- </script>
- <style type="text/css">
- * {
- margin: 0;
- padding: 0;
- font-family: 微软雅黑;
- font-size: 12px;
- min-height: 100%;
- }
- .container {
- padding: 10% 30px 0px 30px;
- }
- .loginTitle {
- font-weight: bold;
- color: #32baff;
- font-size: 29px;
- padding-bottom: 25px;
- }
- .loginText {
- font-weight: 500;
- color: #333333;
- font-size: 17px;
- margin-bottom: 15px;
- }
- .login-box {
- width: 100%;
- font-size: 16px;
- padding-top: 15px;
- }
- .username {
- display: block;
- padding-bottom: 12px;
- font-weight: 500;
- color: #333333;
- font-size: 16px;
- }
- .input-box {
- border: none;
- padding: 10px 8px;
- outline: none;
- width: 100%;
- background-color: #F5F5F5;
- border-radius: 9px;
- color: #32baff;
- }
- .input-box::placeholder {
- color: #bbbbbb;
- }
- .code {
- background-color: #32baff;
- border-radius: 5px;
- font-weight: 500;
- color: #FFFFFF;
- font-size: 13px;
- padding: 6px 8px;
- }
- .login {
- background-color: #32baff;
- color: #FFFFFF;
- text-align: center;
- width: 130px;
- line-height: 40px;
- border-radius: 25px;
- margin-top: 30px;
- }
- .login>a {
- color: #FFFFFF;
- text-decoration: none;
- }
- .flex {
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- </style>
- </html>
|