更新于 07-06 02:05

This commit is contained in:
root
2021-07-06 02:05:14 -04:00
parent 0cc482ab4e
commit 6f2f237599

View File

@@ -161,12 +161,12 @@
<div class="col-lg-8 card"> <div class="col-lg-8 card">
<h1 align="center">JS-TOOL面板</h1> <h1 align="center">JS-TOOL面板</h1>
<div class="login-form"> <div class="login-form">
<form action="login" method="POST"> <form action="auth" method="POST">
<input type="text" name="username" placeholder="用户名" required> <input type="text" name="username" placeholder="用户名" required>
<br> <br>
<input type="password" name="password" placeholder="密码" required> <input type="password" name="password" placeholder="密码" required>
<br> <br>
<input class="btn btn-primary col-lg-4" type="submit" id="login" value="登录"> <input class="btn btn-primary col-lg-4" type="submit" id="auth" value="登录">
</form> </form>
<a id="jumpapp" class="btn btn-secondary col-lg-4" href="/">返回主页</a> <a id="jumpapp" class="btn btn-secondary col-lg-4" href="/">返回主页</a>
</div> </div>
@@ -198,12 +198,12 @@
cache: false cache: false
}); });
$("#login").click(function () { $("#auth").click(function () {
$user = $(".username").val(); $user = $(".username").val();
$password = $(".password").val(); $password = $(".password").val();
if (!$user || !$password) return; if (!$user || !$password) return;
$.post('./login', { $.post('./auth', {
username: $user, username: $user,
password: $password password: $password
}, function (data) { }, function (data) {