This commit is contained in:
limqhz
2022-05-14 01:14:16 +08:00
parent a3df75bd66
commit 9e1dd3af77
31 changed files with 625 additions and 2240 deletions

View File

@@ -5,7 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>登录-Quinn</title>
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrap.min.css}">
<link rel="stylesheet" th:href="@{/bootstrap/css/bootstrapValidator.css}">
<link rel="stylesheet" th:href="@{/css/backgroud.css}">
</head>
<body class="text-center">
@@ -14,25 +13,24 @@
<div class="col-md-4" >
</div>
<div class="col-md-4 mt-5" id='login_box'>
<form class="form-horizontal" method="post" th:action="@{/login}">
<form class="form-horizontal" method="post" th:action="@{/login}" novalidate>
<div class="justify-content-center">
<h1 class="d-block">登录<small style="font-size: small">Quinn</small></h1>
<p class="d-block" th:text="${registerMsg}" style="color: red"></p>
<h1>登录<small style="font-size: small">Quinn</small></h1>
</div>
<div class="form-group">
<label for="username">用户名</label>
<input id="username" name="username" class="form-control" placeholder="用户名" required="">
<input id="username" name="username" class="form-control" placeholder="用户名" required>
</div>
<div class="form-group">
<label for="password">密码</label>
<input id="password" type="password" name="password" class="form-control" placeholder="密码">
<input id="password" type="password" name="password" class="form-control" placeholder="密码" required>
</div>
<div class="checkbox float-left mb-3">
<label>
<input type="checkbox" name="remember" value="remember-me"> 记住密码
</label>
</div>
<button class="btn btn-dark btn-block" type="submit" onclick="this.disabled=true; this.form.submit();">登 录</button>
<button class="btn btn-dark btn-block" type="submit" onclick="loginSubmit()">登 录</button>
<p class="mt-1 clearfix">
<a style="color: white" th:href="@{/register}" class="float-right text-decoration-none">没有账号?去注册</a>
</p>
@@ -46,6 +44,21 @@
<script th:src="@{/bootstrap/js/bootstrap.bundle.min.js}"></script>
<script th:src="@{/js/jquery-ui.min.js}"></script>
<script th:src="@{/live/js/addlive2d.js}"></script>
<script th:src="@{/bootstrap/js/bootstrapValidator.js}"></script>
<script th:src="@{/layer/mobile/layer.js}"></script>
<script type="text/javascript">
function loginSubmit(){
let username = $('#username').val();
let password = $('#password').val();
if (!username){
layer.open({ content: '用户名不能为空', skin: 'msg', time: 2 });
return;
}
if (!password){
layer.open({ content: '密码不能为空', skin: 'msg', time: 2 });
return;
}
this.submit();
}
</script>
</body>
</html>