$(function(){
	$("#excellent").bind('click',function(){
		do_excellent();
	});
});
function do_excellent(){
	var mobile = $("#mobile").val();
	var password = $("#password").val();
	var confirm_pwd = $("#confirm_pwd").val();
	var username=$("#username").val();
	if(!mobile){
		alert('请输入手机号码');
		return false;
	}
	if(!password){
		alert('请输入密码');
		return false;
	}
	if(password!=confirm_pwd){
		alert('两次密码不一致');
		return false;
	}
	var query = new Object();
	query.mobile = mobile;
	query.password = password;
	query.repassword = confirm_pwd;
	query.username=username;
	$.ajax({
		url:APP+'mobile/Login/do_weixin',
		data:query,
		dataType:'json',
		success:function(obj){
			alert(obj.info);
			if(obj.status==1){
				//window.location.href=APP+'mobile/Login/dologin';
			}
		}
	});
}

function verify_mobile(phone){
    if(phone == ''){
        $.showErr('手机号不能为空',0,'hc');
        return false;
    }
    if(!phone.match(/^0?1[3|4|5|8][0-9]\d{8}$/)){
        $.showErr('手机号格式不正确',0,'hc');
        return false;
    }
}