|
|
|
<!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.css" rel="stylesheet" >
|
|
|
|
<link href="__CSS__/unlr.css" rel="stylesheet" >
|
|
|
|
<script src="__JS__/jquery-1.11.1.min.js"></script>
|
|
|
|
|
|
|
|
</head>
|
|
|
|
<body class="unlr">
|
|
|
|
<header class="header forget-header">
|
|
|
|
<div class="">
|
|
|
|
<if condition="I('get.pid') gt 0">
|
|
|
|
<a href="{:U('login',array('pid'=>I('get.pid'),'gid'=>I('get.gid')))}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
|
|
|
|
<else/>
|
|
|
|
<a href="{:U('login')}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
|
|
|
|
</if>
|
|
|
|
<h1 class="caption">注册</h1>
|
|
|
|
</div>
|
|
|
|
</header>
|
|
|
|
<div class="occupy"></div>
|
|
|
|
<section class="trunker">
|
|
|
|
<section class="container">
|
|
|
|
<div class="t-form register-form">
|
|
|
|
<form class="register-box" id="login_form">
|
|
|
|
<div class="form-group clearfix">
|
|
|
|
<div class="input-group clearfix">
|
|
|
|
<span class="mark-text"><span class="table"><span class="table-cell">昵称</span></span></span>
|
|
|
|
<span class="inputbox">
|
|
|
|
<input type="text" name="" class="txt" id="nickname" autocomplete="off" placeholder="" maxlength="15">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="input-group clearfix">
|
|
|
|
<span class="mark-text"><span class="table"><span class="table-cell">密码</span></span></span>
|
|
|
|
<span class="inputbox">
|
|
|
|
<input type="text" name="" class="txt" id="password" autocomplete="off" placeholder="6-15字符" onfocus="this.type='password'" minlength="6">
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
<div class="input-group clearfix">
|
|
|
|
<span class="mark-text"><span class="table"><span class="table-cell">性别</span></span></span>
|
|
|
|
<span class="inputbox">
|
|
|
|
<label class="input-radio">
|
|
|
|
<input type="radio" name="sex" class="radio sex <if condition='$sex == 0'>on</if>" value="0" checked><i class="iconfont icon-male"></i><span>男</span>
|
|
|
|
</label>
|
|
|
|
<label class="input-radio">
|
|
|
|
<input type="radio" name="sex" class="radio sex <if condition='$sex == 1'>on</if>" value="1"><i class="iconfont icon-female"></i><span>女</span>
|
|
|
|
</label>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="btn-group">
|
|
|
|
<input type="button" class="submit nextsubmit" value="下一步">
|
|
|
|
</div>
|
|
|
|
<p class="agree">注册账号表示您同意<a href="{:U('News/protocol')}">《最终用户协议》</a></p>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<div class="popmsg pop-dialog"></div>
|
|
|
|
<script src="__JS__/pop.lwx.min.js"></script>
|
|
|
|
<script src="__JS__/common.js"></script>
|
|
|
|
<script>
|
|
|
|
var pmsg = $('.popmsg').pop();
|
|
|
|
|
|
|
|
$(function() {
|
|
|
|
$('input[name=sex]').change(function() {
|
|
|
|
var that = $(this);
|
|
|
|
$('input[name=sex]').removeClass('on');
|
|
|
|
if (that.prop('checked')) {
|
|
|
|
that.addClass('on');
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
$('.nextsubmit').click(function(event) {
|
|
|
|
var mobile = $.trim($('#nickname').val());
|
|
|
|
var code = $.trim($('#password').val());
|
|
|
|
var sex = $.trim($('input[name=sex]:checked').val());
|
|
|
|
var promoteId = parseInt("{:I('get.pid')}") ? parseInt("{:I('get.pid')}") : 0;
|
|
|
|
var gameId = parseInt("{:I('get.gid')}") ? parseInt("{:I('get.gid')}") : 0;
|
|
|
|
if(mobile.length == 0 ){
|
|
|
|
pmsg.msg('昵称不能为空');event.preventDefault();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if(code.length == 0){
|
|
|
|
pmsg.msg('密码不能为空');event.preventDefault();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if(mobile.length > 15 ){
|
|
|
|
pmsg.msg('昵称在15个字符以内');event.preventDefault();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if(code.length < 6 || code.length > 15){
|
|
|
|
pmsg.msg('密码长度6-15个字符');event.preventDefault();
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
if (mobile) {
|
|
|
|
if (code) {
|
|
|
|
$.ajax({
|
|
|
|
type:'POST',
|
|
|
|
url:'{:U("User/step")}',
|
|
|
|
data:{'nickname':mobile,'password':code,'sex':sex,'promote_id':promoteId,'game_id':gameId},
|
|
|
|
dataType:"Json",
|
|
|
|
success:function(data){
|
|
|
|
console.log(data);
|
|
|
|
if(parseInt(data.status) == 1){
|
|
|
|
window.location.href = data.msg;
|
|
|
|
}else{
|
|
|
|
pmsg.msg(data.msg);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
},
|
|
|
|
error:function(data){
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
}
|
|
|
|
});
|
|
|
|
} else{
|
|
|
|
pmsg.msg('请输入密码');event.preventDefault();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
pmsg.msg('请输入昵称');event.preventDefault();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
</body>
|
|
|
|
</html>
|