You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

128 lines
4.8 KiB
HTML

<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<meta name="applicable-device" content="mobile">
<link href="__CSS__/iconfont.css" rel="stylesheet" >
<link href="__CSS__/common-cz.css" rel="stylesheet" >
<link href="__CSS__/unlr.css" rel="stylesheet" >
<script src="__JS__/jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
<link rel="stylesheet" type="text/css" href="__CSS__/reset.css">
<link rel="stylesheet" type="text/css" href="__CSS__/foot_tabbar.css">
<link rel="stylesheet" type="text/css" href="__CSS__/loginPhTwo.css">
</head>
<body class="unlr">
<div class="loginPhTwo">
<!-- 子页公共头部 -->
<div class="subpage-heard">手机注册
<a href="javascript:window.history.go(-1);" class="arrows"></a>
</div>
<div class="login-box">
<div class="login-input">
<img src="__IMG__/user/shouji.png" alt="">
<input type="text" id="mobile" placeholder="请输入手机号">
</div>
<div class="login-input">
<img src="__IMG__/user/suo.png" alt="">
<input id="password" type="password" placeholder="请输入密码">
</div>
<div class="login-code">
<input id="code" type="text" placeholder="输入验证码">
<div class="jsgetcode">获取验证码</div>
</div>
<button class="login-btn submit">注册</button>
</div>
</div>
<div class="popmsg pop-dialog" style="font-size: .28rem"></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script src="__JS__/common.js"></script>
<script>
var pmsg = $('.popmsg').pop();
$(function() {
$(".clearStr").click(function(){
$("#mobile").val('');
})
$('.jsgetcode').click(function() {
var tis = this,that = $(tis);
if (that.hasClass('disabled')) {return false;}
var mobile = $.trim($('#mobile').val());
var data = {'phone':mobile};
if (mobile) {
if (/^1[0-9]{10}$/.test(mobile)) {
$.ajax({
type:'POST',
url:'{:U("sendsafecode")}',
data:data,
async: false,
dataType:"Json",
success:function(data){
if(parseInt(data.status) == 1){
pmsg.msg('我们已经发送验证码到你的手机<br/>'+mobile,3000);
clock(tis);
}else{
pmsg.msg(data.msg);
return false;
}
}
});
} else {
pmsg.msg('请输入正确的手机号码');
}
} else {
pmsg.msg('请输入手机号码');
}
return false;
});
});
$('.submit').click(function(event) {
var mobile = $.trim($('#mobile').val());
var code = $.trim($('#code').val());
var password = $.trim($('#password').val());
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
if(password.length == 0){
pmsg.msg('密码不能为空');event.preventDefault();
return false;
}
if (mobile) {
if (code) {
$.ajax({
type:'POST',
url:'{:U("register")}',
data:{'phone':mobile,'code':code,'password':password,'promote_id':promoteId,'game_id':gameId},
dataType:"Json",
success:function(data){
if(data.status == 1){
pmsg.msg(data.msg);
window.location.href = data.url;
}else{
pmsg.msg(data.msg);
return false;
}
}
});
return false;
} else{
pmsg.msg('请输入验证码');event.preventDefault();
}
} else {
pmsg.msg('请输入手机号码');event.preventDefault();
}
});
</script>
</body>
</html>