$(function(){
	$("#shop_login").bind('click',function(){
		do_shoplogin();
	});
});
document.onkeydown=function(event){
    var e = event || window.event || arguments.callee.caller.arguments[0];
    if (e && e.keyCode == 13) {
        do_shoplogin();
    } 
}
function do_shoplogin(){
	var login_name = $("#login_name").val();
	var password = $("#password").val();
	if(!login_name || !password){
		$.showErr('请输入登录账号或者密码',0,'hc');
		return false;
	}
	var query = new Object();
	query.login_name = login_name;
	query.password = password;
	query.unverify = 1;
	$.ajax({
		url:APP+'mobile/Login/doshoplogin',
		data:query,
		dataType:'json',
		success:function(data){
			if(data.status==1){
				$.showSuccess(data.info,0,'hc');
				window.location.href = data.url;
			}else{
                $.showErr(data.info,0,'hc');
            }
		}
	});
}