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.

137 lines
5.1 KiB
HTML

5 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>账号注册</title>
<script src="__JS__/jquery-1.11.3.min.js"></script>
<script type="text/javascript" src="__JS__/getRem.js"></script>
5 years ago
<script src="__STATIC__/bg4_4.js"></script>
5 years ago
<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__/step1.css">
<link href="__CSS__/common-cz.css" rel="stylesheet" >
</head>
<body>
<div class="login">
<!-- 子页公共头部 -->
<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__/new/people.png" alt="">
<input type="text" placeholder="请输入账号" name="account" id="account" value="">
</div>
<div class="login-input">
<img src="__IMG__/new/suo.png" alt="">
<input type="password" placeholder="请输入密码" name="password" id="password" value="">
</div>
<!--<div class="login-input">
5 years ago
<img src="__IMG__/new/nicheng.png" alt="">
<input type="text" placeholder="请输入昵称" name="nickname" id="nickname" value="">
</div>-->
5 years ago
<!-- <div class="login-gender">
5 years ago
<div class="title">
<img src="__IMG__/new/xingbie.png" alt="">
<span>性别</span>
5 years ago
</div>
5 years ago
<div class="radio">
<span></span>
<input id="radio-1" name="sex" type="radio" value="男" checked>
<label for="radio-1" class="radio-label"></label>
</div>
<div class="radio">
<span></span>
<input id="radio-2" name="sex" type="radio" value="女">
<label for="radio-2" class="radio-label"></label>
</div>
5 years ago
</div> -->
5 years ago
<button class="login-btn nextsubmit">注册</button>
<div class="login-agreement">注册即表示同意<a href="{:U('News/protocol')}">《用户协议》</a></div>
</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() {
5 years ago
$('input[name=sex]').change(function() {
5 years ago
var that = $(this);
$('input[name=sex]').removeClass('on');
if (that.prop('checked')) {
that.addClass('on');
}
5 years ago
});
5 years ago
5 years ago
$('.nextsubmit').click(function(event) {
var account = $.trim($('#account').val());
var nickname = $.trim($('#nickname').val())
var password = $.trim($('#password').val());
5 years ago
// var sex = $.trim($('input[name=sex]:checked').val());
5 years ago
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
if(account.length == 0 ){
pmsg.msg('账号不能为空');event.preventDefault();
return false;
5 years ago
}
/*if(nickname.length == 0 ){
5 years ago
pmsg.msg('昵称不能为空');event.preventDefault();
return false;
}*/
5 years ago
if(password.length == 0){
pmsg.msg('密码不能为空');event.preventDefault();
return false;
}
if(account.length > 15 || account.length < 6){
pmsg.msg('账号在6-15个字符之间');event.preventDefault();
return false;
}
if(nickname.length > 15 ){
pmsg.msg('昵称在15个字符以内');event.preventDefault();
return false;
}
if(password.length < 6 || password.length > 15){
pmsg.msg('密码长度6-15个字符');event.preventDefault();
return false;
}
if (account) {
if (password) {
$.ajax({
type:'POST',
url:'{:U("User/step1")}',
5 years ago
data:{'account':account,'nickname':nickname,'password':password,'promote_id':promoteId,'game_id':gameId},
5 years ago
dataType:"Json",
success:function(data){
pmsg.msg(data.msg);
if(parseInt(data.status) == 1){
window.location.href = data.url;
}
},
error:function(data){
console.log(data);
}
});
} else{
pmsg.msg('请输入密码');event.preventDefault();
}
} else {
pmsg.msg('请输入账号');event.preventDefault();
}
});
});
</script>
</body>
</html>