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.
179 lines
7.9 KiB
HTML
179 lines
7.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<meta charset="UTF-8" >
|
|
<link rel="shortcut icon" href="">
|
|
|
|
<title>玩游戏 就上{:C(APP_NAME)}</title>
|
|
<meta name="keywords" content="">
|
|
<meta name="description" content="">
|
|
<link href="__CSS__/common.css" rel="stylesheet">
|
|
|
|
<script src="__JS__/jquery.min.js"></script>
|
|
<script src="__JS__/common.js"></script>
|
|
<script src="__STATIC__/layer/layer.js"></script>
|
|
<style>
|
|
.main form {padding-top:8px;}
|
|
.main form .inputgroup .getcode {color:#2A58A5;background:#FFF;border-radius:46px;}
|
|
.main form .agree span {text-align:left;}
|
|
.main form .agree span {display:inline;}
|
|
</style>
|
|
|
|
</head>
|
|
<body>
|
|
<div class="main">
|
|
<div class="inner">
|
|
<div class="banner">
|
|
<img class="img1" src="__IMG__/img_invite.png" >
|
|
<img class="img2" src="__IMG__/img_invite.png" >
|
|
<p class="">
|
|
{:C(APP_NAME)}是一款拿返利、享折扣的手游平台,我们为您提供了海量游戏福利,大礼包等;让您轻松畅玩游戏的同时,可参与各种活动、获取大量积分、平台币,达到免费玩游戏、免费兑换商品的目的
|
|
</p>
|
|
</div>
|
|
<form>
|
|
<div class="inputgroup clearfix">
|
|
<div class="formgroup">
|
|
<i class=""><img src="__IMG__/phone.png"></i>
|
|
<input id="phone" class="formcontrol" type="text" placeholder="手机号码" >
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup clearfix">
|
|
<div class="formgroup formgroupcode">
|
|
<i class=""><img src="__IMG__/barcode.png"></i>
|
|
<input class="formcontrol code" id="code" type="text" placeholder="验证码" >
|
|
</div>
|
|
<button class="getcode" id="get_code" type="button">获取验证码</button>
|
|
</div>
|
|
<div class="inputgroup clearfix">
|
|
<div class="formgroup formpassword">
|
|
<i class=""><img src="__IMG__/password.png"></i>
|
|
<input class="formcontrol" id="password" type="password" placeholder="请设定登录密码">
|
|
<i class="jsvisible" ><img src="__IMG__/invisible.png"></i>
|
|
</div>
|
|
</div>
|
|
<div class="inputgroup btnwrap clearfix">
|
|
<div class="formgroup">
|
|
<input type="button" class="btn" id="submit_btn" value="下一步" >
|
|
</div>
|
|
<div class="agree">
|
|
<span>注册则视为阅读并同意</span>
|
|
<a href="{:U('article/agreement')}"><span>《{:C(APP_NAME)}网络协议》</span></a>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
|
|
</div>
|
|
<script>
|
|
$(function() {
|
|
$('.jsvisible').on("click",function() {
|
|
var that = $(this);
|
|
if (that.hasClass('closeeye')) {
|
|
$('input[id=password]').attr('type','password');
|
|
that.removeClass('closeeye').find('img').attr('src','__IMG__/invisible.png');
|
|
} else {
|
|
$('input[id=password]').attr('type','text');
|
|
that.addClass('closeeye').find('img').attr('src','__IMG__/visible.png');
|
|
}
|
|
|
|
});
|
|
|
|
//发送短信
|
|
$("#get_code").click(function(){
|
|
var phone = $("#phone").val();
|
|
if(phone == ""){
|
|
layer.msg("手机号不能为空");
|
|
return false;
|
|
}
|
|
if (!(/^1[34578]\d{9}$/.test(phone))) {
|
|
layer.msg('手机号码格式不正确');
|
|
return false;
|
|
}
|
|
|
|
var that = $(this);
|
|
if(that.hasClass('disabled')) {return false;}
|
|
that.addClass('disabled');
|
|
$.ajax({
|
|
type:"post",
|
|
url:"{:U('User/send_msg')}",
|
|
dataType:"json",
|
|
data:{phone:$("#phone").val()},
|
|
success:function(data){
|
|
if(data.code == 200){
|
|
timedown("#get_code");
|
|
that.removeClass('disabled');
|
|
}else{
|
|
layer.msg(data.msg);
|
|
setTimeout(function(){that.removeClass('disabled');},3000);
|
|
}
|
|
},error:function() {
|
|
that.removeClass('disabled');
|
|
layer.msg('服务器故障,请稍候再试')
|
|
}
|
|
});
|
|
return false;
|
|
});
|
|
|
|
//注册
|
|
$("#submit_btn").click(function(){
|
|
var phone = $("#phone").val();
|
|
var code = $("#code").val();
|
|
var password = $("#password").val();
|
|
if(phone == ""){
|
|
layer.msg("手机号不能为空");
|
|
return false;
|
|
}
|
|
if(code == ""){
|
|
layer.msg("验证码不能为空");
|
|
return false;
|
|
}
|
|
if(password == ""){
|
|
layer.msg("密码不能为空");
|
|
return false;
|
|
}
|
|
var invite_account = "{:I('invite_account')}";
|
|
var game_id = "{:I('game_id')}";
|
|
$.ajax({
|
|
type:"post",
|
|
url:"{:U('Share/share_register')}",
|
|
dataType:"json",
|
|
data:{phone:$("#phone").val(),password:$("#password").val(),v_code:$("#code").val(),invite_account:invite_account,game_id:game_id},
|
|
success:function(data){
|
|
if(data.code == -1){
|
|
var msg = "";
|
|
switch (data.msg){
|
|
case -1: msg = "用户名不合法";break;
|
|
case -2: msg = "包含敏感字符";break;
|
|
case -3: msg = "用户已存在";break;
|
|
case 98: msg = "验证码超时";break;
|
|
case -97: msg = "验证码错误";break;
|
|
case 2: msg = "验证码错误";break;
|
|
default : msg = data.msg;
|
|
}
|
|
layer.msg(msg);
|
|
}else{
|
|
|
|
window.location.href = "/mobile.php";
|
|
|
|
}
|
|
}
|
|
});
|
|
});
|
|
});
|
|
|
|
function timedown(e) {
|
|
var t = t?t:60,s = $(e);
|
|
s.attr('disabled','disabled');
|
|
var a = setInterval(function() {
|
|
t--;
|
|
s.text(t + '秒后重发'),
|
|
0 == t && (s.removeAttr('disabled').text('获取验证码'), clearInterval(a))
|
|
},1e3)
|
|
};
|
|
</script>
|
|
</body>
|
|
</html> |