mirror of
https://github.com/lan-tianxiang/JS_TOOL.git
synced 2025-07-14 18:02:36 +08:00
25 lines
472 B
JavaScript
Executable File
25 lines
472 B
JavaScript
Executable File
$.ajaxSetup({
|
|
cache: false
|
|
});
|
|
|
|
$("#login").click(function () {
|
|
$user = $(".username").val();
|
|
$password = $(".password").val();
|
|
if (!$user || !$password) return;
|
|
|
|
$.post('./login', {
|
|
username: $user,
|
|
password: $password
|
|
}, function (data) {
|
|
if (data.err == 0) {
|
|
window.location.href = "./usrconfig";
|
|
} else {
|
|
Swal.fire({
|
|
text: data.msg,
|
|
icon: 'error'
|
|
})
|
|
}
|
|
});
|
|
return false;
|
|
});
|