$.ajax({
type: "post",
url: "../../api/user/Login.ashx",
data: { name: Name, pass: Pass },
success: function (data) {
if (data.code == 0) {
layer.msg(data.msg, { icon: 1, time: 500 }, function () {
window.location.href = "index.html";
});
}
else {
layer.msg(data.msg, {
icon: 5,
anim: 6,
time: 2000
});
}
},
error: function () {
layer.msg('系统错误!', {
icon: 2,
anim: 6,
time: 2000
});
}
});