var obj = {};
var userName = $("#username-id").val();
var password = $("#password-id").val();
obj.userName = userName;
obj.password = password;
$.ajax({
url : path + "/login.html",
type : "post",
dataType : "json",
data : obj,
cache : false,
async : false,
success : function(data) {
if(data.status == "success"){
//window.location.href=data.url;
sessionStorage.setItem("data",data);
window.open(data.url);
//drawLine(data);
}else if(data.status == "failure"){
//console.log("用户名或密码错误");
layer.msg("用户名或密码错误");
//window.location.href=data.url;
}
},
error : function(XMLHttpRequest, textStatus, errorThrown) {
}
});
|