94 lines
2.9 KiB
Plaintext
94 lines
2.9 KiB
Plaintext
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<title>AdminLTE 3 | Log in</title>
|
|
|
|
|
|
<!-- Font Awesome -->
|
|
<link rel="stylesheet" href="/AdminLTE/plugins/fontawesome-free/css/all.min.css">
|
|
|
|
<!-- Theme style -->
|
|
<link rel="stylesheet" href="/AdminLTE/dist/css/adminlte.min.css">
|
|
</head>
|
|
<body class="hold-transition login-page">
|
|
|
|
<div class="login-box">
|
|
<div class="card card-outline card-primary">
|
|
<div class="card-header text-center">
|
|
<a href="#" class="h1"><b>打工人</b></a>
|
|
</div>
|
|
<div class="card-body">
|
|
<p class="login-box-msg">登录以开始会话</p>
|
|
|
|
<form action="../../index3.html" method="post">
|
|
<div class="input-group mb-3">
|
|
<input type="email" class="form-control" id="UserName" placeholder="用户名">
|
|
|
|
</div>
|
|
<div class="input-group mb-3">
|
|
<input type="password" class="form-control" id="UserPwd" placeholder="密码">
|
|
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-8">
|
|
|
|
</div>
|
|
<!-- /.col -->
|
|
<div class="col-4">
|
|
<button type="button" class="btn btn-primary btn-block" onclick="login()"> 登录 </button>
|
|
</div>
|
|
<!-- /.col -->
|
|
</div>
|
|
</form>
|
|
|
|
|
|
|
|
</div>
|
|
<!-- /.card-body -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- /.login-box -->
|
|
<!-- jQuery -->
|
|
<script src="/AdminLTE/plugins/jquery/jquery.min.js"></script>
|
|
<!-- Bootstrap 4 -->
|
|
<script src="/AdminLTE/plugins/bootstrap/js/bootstrap.bundle.min.js"></script>
|
|
<!-- AdminLTE App -->
|
|
<script src="/AdminLTE/dist/js/adminlte.min.js"></script>
|
|
|
|
<script >
|
|
|
|
function login() {
|
|
$.ajax({
|
|
url: "/Login/GetUser",
|
|
type: 'post',
|
|
dataType: "json",
|
|
contentType: "application/json",
|
|
data: JSON.stringify({ action: 'login', 'UserPwd': $('#UserPwd').val(), 'UserName': $('#UserName').val()}),
|
|
success: function (msg) {
|
|
|
|
if (msg.Code == 1) {
|
|
window.location.href = "/Home/Index";
|
|
} else {
|
|
alert(msg.Msg);
|
|
}
|
|
},
|
|
error: function (XMLHttpRequest, textStatus, errorThrown) {
|
|
|
|
},
|
|
complete: function () {
|
|
|
|
}
|
|
});
|
|
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
</html>
|