$.ajax({
type: "POST",
url: "/user/index/login-ajax/",
data: {username:account,password:password,code:code},
cache: false,
dataType: 'json',
success: function (res){
if (res.status=="Y"){
//alert("登录成功");
//window.location.reload();
//return true;
location.href = "/user/index/index"; //这句不执行求解
//location.reload();
return true;
}else{
$("#error").addClass("error").hide().html(res.msg).fadeIn();
changeVcode();
return false;
}
}
});
return false;
type: "POST",
url: "/user/index/login-ajax/",
data: {username:account,password:password,code:code},
cache: false,
dataType: 'json',
success: function (res){
if (res.status=="Y"){
//alert("登录成功");
//window.location.reload();
//return true;
location.href = "/user/index/index"; //这句不执行求解
//location.reload();
return true;
}else{
$("#error").addClass("error").hide().html(res.msg).fadeIn();
changeVcode();
return false;
}
}
});
return false;