手机注册

master
chenxiaojun 5 years ago
commit 60bd92fb21

@ -29,7 +29,7 @@
<div class="forget"><a href="{:U('User/forget')}">忘记密码?</a></div>
<button class="enter submit">登录</button>
<if condition="I('get.pid') gt 0">
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="<?='mobile.php?s=/User/step/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 手机注册 </a></div>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="<?='mobile.php?s=/User/step1/pid/'.I('get.pid').'/gid/'.I('get.gid').'.html'?>"> 账号注册 </a>|<a href="{:U('User/register',array('pid'=>I('get.pid',0),'gid'=>I('get.gid',0)))}"> 手机注册 </a></div>
<else/>
<div class="promptly">还没有账号?<a style="margin-left: 10px;" href="{:U('User/step1')}"> 账号注册 </a>|<a href="{:U('User/register')}"> 手机注册 </a></div>
</if>

@ -59,12 +59,20 @@
var tis = this,that = $(tis);
if (that.hasClass('disabled')) {return false;}
var mobile = $.trim($('#mobile').val());
var promoteId = parseInt("{:I('get.pid',0)}");
var gameId = parseInt("{:I('get.gid',0)}");
var data = {};
if (promoteId > 0 && gameId > 0) {
data = {'phone':mobile,'promote_id':promoteId,'game_id':gameId};
} else {
data = {'phone':mobile};
}
if (mobile) {
if (/^1[0-9]{10}$/.test(mobile)) {
$.ajax({
type:'POST',
url:'{:U("sendsafecode")}',
data:{'phone':mobile},
data:data,
async: false,
dataType:"Json",
success:function(data){

Loading…
Cancel
Save