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.
147 lines
6.1 KiB
HTML
147 lines
6.1 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.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="">
|
|
<a href="{:U('login')}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
|
|
<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="account" 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">
|
|
<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">
|
|
<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 account = $.trim($('#account').val());
|
|
var nickname = $.trim($('#nickname').val())
|
|
var password = $.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(account.length == 0 ){
|
|
pmsg.msg('账号不能为空');event.preventDefault();
|
|
return false;
|
|
}
|
|
if(nickname.length == 0 ){
|
|
pmsg.msg('昵称不能为空');event.preventDefault();
|
|
return false;
|
|
}
|
|
if(password.length == 0){
|
|
pmsg.msg('密码不能为空');event.preventDefault();
|
|
return false;
|
|
}
|
|
if(account.length > 15 ){
|
|
pmsg.msg('账号在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")}',
|
|
data:{'account':account,'nickname':nickname,'password':password,'sex':sex,'promote_id':promoteId,'game_id':gameId},
|
|
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> |