补充用户协议

master
liuweiwen 5 years ago
parent e6e382fa2a
commit 473ad69fa3

@ -1,6 +1,6 @@
<!DOCTYPE HTML> <!DOCTYPE HTML>
<html> <html>
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title></title> <title></title>
<meta name="keywords" content="" /> <meta name="keywords" content="" />
@ -20,109 +20,111 @@
<link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css"> <link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css">
<link rel="stylesheet" type="text/css" href="__CSS__/loginPhTwo.css"> <link rel="stylesheet" type="text/css" href="__CSS__/loginPhTwo.css">
</head> </head>
<body class="unlr"> <body class="unlr">
<div class="loginPhTwo"> <div class="loginPhTwo">
<!-- 子页公共头部 --> <!-- 子页公共头部 -->
<div class="subpage-heard">手机注册 <div class="subpage-heard">手机注册
<a href="javascript:window.history.go(-1);" class="arrows"></a> <a href="javascript:window.history.go(-1);" class="arrows"></a>
</div> </div>
<div class="login-box"> <div class="login-box">
<div class="login-input"> <div class="login-input">
<img src="__IMG__/user/shouji.png" alt=""> <img src="__IMG__/user/shouji.png" alt="">
<input type="text" id="mobile" placeholder="请输入手机号"> <input type="text" id="mobile" placeholder="请输入手机号">
</div> </div>
<div class="login-input"> <div class="login-input">
<img src="__IMG__/user/suo.png" alt=""> <img src="__IMG__/user/suo.png" alt="">
<input id="password" type="password" placeholder="请输入密码"> <input id="password" type="password" placeholder="请输入密码">
</div> </div>
<div class="login-code"> <div class="login-code">
<input id="code" type="text" placeholder="输入验证码"> <input id="code" type="text" placeholder="输入验证码">
<div class="jsgetcode">获取验证码</div> <div class="jsgetcode">获取验证码</div>
</div> </div>
<button class="login-btn submit">注册</button> <button class="login-btn submit">注册</button>
</div> <div class="login-agreement">注册即表示同意<a href="{:U('News/protocol')}">《用户协议》</a></div>
</div>
</div>
<div class="popmsg pop-dialog" style="font-size: .28rem"></div> </div>
<script src="__JS__/pop.lwx.min.js"></script>
<script src="__JS__/common.js"></script> <div class="popmsg pop-dialog" style="font-size: .28rem"></div>
<script> <script src="__JS__/pop.lwx.min.js"></script>
var pmsg = $('.popmsg').pop(); <script src="__JS__/common.js"></script>
$(function() { <script>
var pmsg = $('.popmsg').pop();
$(function() {
$(".clearStr").click(function(){ $(".clearStr").click(function(){
$("#mobile").val(''); $("#mobile").val('');
}) })
$('.jsgetcode').click(function() { $('.jsgetcode').click(function() {
var tis = this,that = $(tis); var tis = this,that = $(tis);
if (that.hasClass('disabled')) {return false;} if (that.hasClass('disabled')) {return false;}
var mobile = $.trim($('#mobile').val()); var mobile = $.trim($('#mobile').val());
var data = {'phone':mobile}; var data = {'phone':mobile};
if (mobile) { if (mobile) {
if (/^1[0-9]{10}$/.test(mobile)) { if (/^1[0-9]{10}$/.test(mobile)) {
$.ajax({ $.ajax({
type:'POST', type:'POST',
url:'{:U("sendsafecode")}', url:'{:U("sendsafecode")}',
data:data, data:data,
async: false, async: false,
dataType:"Json", dataType:"Json",
success:function(data){ success:function(data){
if(parseInt(data.status) == 1){ if(parseInt(data.status) == 1){
pmsg.msg('我们已经发送验证码到你的手机<br/>'+mobile,3000); pmsg.msg('我们已经发送验证码到你的手机<br/>'+mobile,3000);
clock(tis); clock(tis);
}else{ }else{
pmsg.msg(data.msg); pmsg.msg(data.msg);
return false; return false;
} }
} }
}); });
} else {
pmsg.msg('请输入正确的手机号码');
}
} else { } else {
pmsg.msg('请输入正确的手机号码'); pmsg.msg('请输入手机号码');
} }
} else { return false;
pmsg.msg('请输入手机号码');
}
return false;
}); });
}); });
$('.submit').click(function(event) { $('.submit').click(function(event) {
var mobile = $.trim($('#mobile').val()); var mobile = $.trim($('#mobile').val());
var code = $.trim($('#code').val()); var code = $.trim($('#code').val());
var password = $.trim($('#password').val()); var password = $.trim($('#password').val());
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0; var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0; var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
if(password.length == 0){ if(password.length == 0){
pmsg.msg('密码不能为空');event.preventDefault(); pmsg.msg('密码不能为空');event.preventDefault();
return false; return false;
} }
if (mobile) { if (mobile) {
if (code) { if (code) {
$.ajax({ $.ajax({
type:'POST', type:'POST',
url:'{:U("register")}', url:'{:U("register")}',
data:{'phone':mobile,'code':code,'password':password,'promote_id':promoteId,'game_id':gameId}, data:{'phone':mobile,'code':code,'password':password,'promote_id':promoteId,'game_id':gameId},
dataType:"Json", dataType:"Json",
success:function(data){ success:function(data){
if(data.status == 1){ if(data.status == 1){
pmsg.msg(data.msg); pmsg.msg(data.msg);
window.location.href = data.url; window.location.href = data.url;
}else{ }else{
pmsg.msg(data.msg); pmsg.msg(data.msg);
return false; return false;
}
} }
}
}); });
return false; return false;
} else{ } else{
pmsg.msg('请输入验证码');event.preventDefault(); pmsg.msg('请输入验证码');event.preventDefault();
} }
} else { } else {
pmsg.msg('请输入手机号码');event.preventDefault(); pmsg.msg('请输入手机号码');event.preventDefault();
} }
}); });
</script> </script>
</body> </body>
</html> </html>

@ -10,7 +10,7 @@
<form id="form" action="" method="post" onsubmit="return false" class=""> <form id="form" action="" method="post" onsubmit="return false" class="">
<div class="name"> <div class="name">
<!-- 子页公共头部 --> <!-- 子页公共头部 -->
<div class="subpage-heard">修改名字 <div class="subpage-heard">修改昵称
<a href="javascript:window.history.go(-1);" class="arrows"></a> <a href="javascript:window.history.go(-1);" class="arrows"></a>
</div> </div>
<div class="name-info"> <div class="name-info">

@ -77,4 +77,14 @@
line-height: 0.8rem; line-height: 0.8rem;
outline: 0; outline: 0;
border: 0; border: 0;
} }
.login-agreement {
font-size: 0.24rem;
color: #292929;
margin-top: 0.32rem;
}
.login-agreement>a {
color: #389AED;
font-size: 0.24rem;
}
Loading…
Cancel
Save