AudioHTML/login.html

110 lines
4.1 KiB
HTML
Raw Normal View History

2023-10-29 16:52:53 +08:00
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/app.css" rel="stylesheet">
2023-11-08 00:29:39 +08:00
<script src="js/config.js"></script>
<script src="js/jquery-3.7.1.js"></script>
2023-10-29 16:52:53 +08:00
</head>
<body class="d-flex h-100 text-center text-bg-dark">
<div class="d-flex w-100 h-100 mx-auto flex-column">
<header class="mb-auto">
<!-- <div>
<h3 class="float-md-start mb-0">Cover</h3>
<nav class="nav nav-masthead justify-content-center float-md-end">
<a class="nav-link fw-bold py-1 px-0 active" aria-current="page" href="#">Home</a>
<a class="nav-link fw-bold py-1 px-0" href="#">Features</a>
<a class="nav-link fw-bold py-1 px-0" href="#">Contact</a>
</nav>
</div> -->
</header>
<main class="px-3 d-flex justify-content-center">
<div class="border border-black login">
<div class="dotblock py-3 login-title">GEAZAN</div>
<div class="login-form pt-5 mx-auto">
<div class="mb-4 input-group input-group-lg">
2023-11-08 19:15:11 +08:00
<input class="form-control" id="name" placeholder="Username" />
2023-10-29 16:52:53 +08:00
</div>
<div class="mb-5 input-group input-group-lg">
2023-11-08 19:15:11 +08:00
<input type="password" class="form-control" id="password" placeholder="Password" />
2023-10-29 16:52:53 +08:00
</div>
<div class="mt-5 pb-5 d-grid">
2023-11-08 19:15:11 +08:00
<button type="button" id="submit" class="btn btn-lg btn-dark border border-black">LOGIN</button>
2023-10-29 16:52:53 +08:00
</div>
<div class="mt-5 mb-3" style="color: #888888;">
<div>GUI V1.0.0
</div>
<div>FIRMWARE V1.0.0</div>
</div>
</div>
</div>
<!-- <h1>Cover your page.</h1>
<p class="lead">Cover is a one-page template for building simple and beautiful home pages. Download, edit
the text, and add your own fullscreen background photo to make it your own.</p>
<p class="lead">
<a href="#" class="btn btn-lg btn-light fw-bold border-white bg-white">Learn more</a>
</p> -->
</main>
<footer class="mt-auto text-white-50">
<div class="dotblock d-flex justify-content-between px-5 py-4">
<div class="">Geazan</div>
<div>www.geazan.com</div>
</div>
</footer>
</div>
2023-11-08 00:29:39 +08:00
<script>
document.addEventListener("DOMContentLoaded", function () {
//初始化配置
})
$(document).ready(function () {
$("#submit").on("click", function () {
2023-11-08 19:15:11 +08:00
let name = $("#name").val()
let password = $("#password").val()
2023-11-10 11:53:14 +08:00
if (name.length == 0) {
alert('Please enter your username')
return
}
if (password.length == 0) {
alert('Please enter the account login password')
return
}
2023-11-15 18:43:40 +08:00
let url = '/cgi-bin/test.cgi';
let postData = {
action: 'login_set',
name: name,
password: password
}
2023-11-10 11:53:14 +08:00
$.ajax({
type: 'POST',
url: url,
2023-11-15 18:43:40 +08:00
data: postData,
2023-11-10 11:53:14 +08:00
dataType: "json",
2023-11-15 18:43:40 +08:00
contentType: "application/json; charset=utf-8",
2023-11-10 11:53:14 +08:00
success: function (res) {
2023-11-15 18:43:40 +08:00
if (res.success) {
alert('登录成功')
}
else {
alert(res.message)
}
2023-11-10 11:53:14 +08:00
},
2023-11-15 18:43:40 +08:00
error: function (res) {
2023-11-10 11:53:14 +08:00
}
})
2023-11-08 00:29:39 +08:00
})
})
</script>
2023-11-19 18:41:22 +08:00
<script src="js/main.js"></script>
2023-10-29 16:52:53 +08:00
</body>
</html>