1
0
mirror of https://e.coding.net/circlecloud/McAccount.git synced 2024-11-22 01:48:55 +00:00

update register...

This commit is contained in:
502647092 2015-10-13 15:05:23 +08:00
parent 69288bd8dc
commit a8b45f0800

View File

@ -104,46 +104,47 @@ $("#register").click(function(){
$('#email').val("");
return false;
}
$.ajax({ url:"<?=Url('user_public','user_check')?>", type:"GET", data:{user:username.val()}, dataType:"json",
success:function(rdata){
alert("checkuser");
switch(rdata.status){
case "success":
$.ajax({url:"<?=Url('user_public','mail_check')?>", type:"GET", data:{mail:email.val()}, dataType:"json",
success:function(s){
alert("checkmail");
switch(s.status){
case "success":
$.ajax({
type:"POST", data:{user:username.val(), mail:email.val(),pass:pass.val()}, dataType:"json", url:"<?=Url('user_public','register')?>",
success:function(C){
alert("reg");
switch(C.status){
case "success":
alert(C.info);
location.href = "<?=Url('index','index')?>";
break;
case "error":
alert(A.info);
break;
}
}
})
break;
case "error":
alert(s.info);
return false;
}
}
})
break;
case "error":
alert(rdata.info);
return false;
}
}
alert(7);
})
$.ajax({ url:"<?=Url('user_public','user_check')?>", type:"GET", data:{user:username.val()}, dataType:"json",
success:function(rdata){
alert("checkusersuccess");
switch(rdata.status){
case "success":
$.ajax({url:"<?=Url('user_public','mail_check')?>", type:"GET", data:{mail:email.val()}, dataType:"json",
success:function(s){
alert("checkmail");
switch(s.status){
case "success":
$.ajax({
type:"POST", data:{user:username.val(), mail:email.val(),pass:pass.val()}, dataType:"json", url:"<?=Url('user_public','register')?>",
success:function(C){
alert("reg");
switch(C.status){
case "success":
alert(C.info);
location.href = "<?=Url('index','index')?>";
break;
case "error":
alert(A.info);
break;
}
}
})
break;
case "error":
alert(s.info);
return false;
}
}
})
break;
case "error":
alert(rdata.info);
return false;
}
},
error:function(){
alert("checkusererror");
})
})
</script>
</body>