a
This commit is contained in:
@@ -1,143 +1,106 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>用户登录</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
|
||||
<meta http-equiv="Cache-Control" content="no-siteapp">
|
||||
<title>登录 - 生长激素缺乏预测模型后台</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/style.css" />
|
||||
<link rel="stylesheet" type="text/css" href="/static/adminghd/css/login.css" />
|
||||
<style>
|
||||
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #11998e 0%, #38ef7d 50%, #06beb6 100%); padding: 20px; box-sizing: border-box; }
|
||||
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden; }
|
||||
.login-card .login-header { padding: 36px 24px 24px; text-align: center; border-bottom: 1px solid #f0f0f0; }
|
||||
.login-card .login-title { font-size: 18px; font-weight: 600; color: #1f2d3d; line-height: 1.5; margin: 0; }
|
||||
.login-card .login-body { padding: 32px 28px 40px; }
|
||||
.login-card .form-item { margin-bottom: 22px; }
|
||||
.login-card .form-item input { width: 100%; height: 48px; padding: 0 16px; border: 1px solid #e0e0e0; border-radius: 8px; font-size: 15px; color: #333; background: #fafafa; box-sizing: border-box; transition: border-color .2s, background .2s; }
|
||||
.login-card .form-item input::placeholder { color: #aaa; }
|
||||
.login-card .form-item input:focus { outline: none; border-color: #11998e; background: #fff; }
|
||||
.login-card .form-item .warning { display: block; margin-top: 6px; font-size: 12px; color: #e4393c; min-height: 18px; }
|
||||
.login-card .btn-login { width: 100%; height: 48px; border: none; border-radius: 8px; font-size: 16px; font-weight: 500; color: #fff; background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); cursor: pointer; transition: opacity .2s, transform .05s; }
|
||||
.login-card .btn-login:hover { opacity: 0.95; }
|
||||
.login-card .btn-login:active { transform: scale(0.99); }
|
||||
#cover.modal { display: none !important; line-height: 100vh; text-align: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.6); z-index: 9999; color: #fff; font-size: 18px; }
|
||||
#cover.modal.show { display: flex !important; align-items: center; justify-content: center; }
|
||||
</style>
|
||||
</head>
|
||||
<style>
|
||||
.login-top .tbb{ font-size:18px; font-weight:bold; position:absolute; bottom:0; left:195px; color:#FFD200;}
|
||||
</style>
|
||||
<body style='min-width:1235px'>
|
||||
<div style='height:100px;'></div>
|
||||
<div style='background:#e3e3e3;height:450px;width:100%;position:relative;'>
|
||||
<div style='width:350px;height:400px;background:#EDF1F5;float:right;margin-right:20%;margin-top:1.5%;box-shadow:#666 0px 0px 20px;'>
|
||||
<div class="login-top" style="padding-bottom:0;">
|
||||
<div style='color:#453A3E;margin:30px auto 10px auto;width:auto;max-width:90%;font-size:16px;font-weight:bold;text-align:center;padding:0 10px;'>生长激素缺乏预测模型后台</div>
|
||||
</div>
|
||||
<div style='height:1px;width:100%;background:#DEDCDD;'>
|
||||
<div style='background:#e3e3e3;height:3px;width:80%;margin:0px auto 0 auto;'></div>
|
||||
</div>
|
||||
<form method="post" id="agent_login" name="login">
|
||||
<div class="login-content">
|
||||
<ul class="user-logn">
|
||||
<li class="user-jobnum" style='width:100%;margin-bottom:0px;'>
|
||||
<div class="li-bg error" style='width:100%;'>
|
||||
<label></label>
|
||||
<input type="text" id="username" name="username" placeholder="请输入账号" value="" validate="" validatename="工号" class="phonecode" style='width:83%;padding-right:0px;background:#EDF1F5;height:40px;border:2px solid balck;border-radius:4px;'/>
|
||||
<span id="checkusername" class="warning"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li class="pwd" style='width:100%;margin-bottom:0px;'>
|
||||
<div class="li-bg " style='width:100%;'>
|
||||
<label></label>
|
||||
<input type="password" style="width: 0;height: 0;border: none;" name="">
|
||||
<input type="password" autocomplete="off" id="admin_password" name="password" class="pwd" placeholder="请输入密码" validate="" validatename="密码" style='border:2px solid balck;width:83%;padding-right:0px;background:#EDF1F5;height:40px;border-radius:4px;'>
|
||||
<span id="checkpassword" class="warning"></span>
|
||||
</div>
|
||||
</li>
|
||||
<li style="margin-top:40px;width:100%;">
|
||||
<button type="submit" name="dologinbtn" style='background:#afaeb2;border-radius:4px;height:35px;width:100%;' class="actLogin" onclick="return checklogin(this.form);">立即登录</button>
|
||||
<input type="hidden" name="loginsubmit" value="true" />
|
||||
</li>
|
||||
</ul>
|
||||
<body>
|
||||
<div class="login-wrap">
|
||||
<div class="login-card">
|
||||
<div class="login-header">
|
||||
<h1 class="login-title">生长激素缺乏预测模型后台</h1>
|
||||
</div>
|
||||
</form>
|
||||
<div class="login-body">
|
||||
<form method="post" id="agent_login" name="login">
|
||||
<div class="form-item">
|
||||
<input type="text" id="username" name="username" placeholder="请输入账号" value="" autocomplete="username" />
|
||||
<span id="checkusername" class="warning"></span>
|
||||
</div>
|
||||
<div class="form-item">
|
||||
<input type="password" style="width:0;height:0;border:none;position:absolute;opacity:0;" name="" tabindex="-1" />
|
||||
<input type="password" autocomplete="off" id="admin_password" name="password" placeholder="请输入密码" />
|
||||
<span id="checkpassword" class="warning"></span>
|
||||
</div>
|
||||
<div class="form-item" style="margin-bottom:0;margin-top:28px;">
|
||||
<button type="submit" name="dologinbtn" class="btn-login" onclick="return checklogin(this.form);">立即登录</button>
|
||||
<input type="hidden" name="loginsubmit" value="true" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cover" class="modal">身份获取中。。。</div>
|
||||
</div>
|
||||
|
||||
<div id="cover" class="modal" style="display:none !important;">身份获取中...</div>
|
||||
|
||||
<script type="text/javascript" src="/static/adminghd/js/jquery.js"></script>
|
||||
<script>
|
||||
var _login_time = -1;
|
||||
var _user_type = '';
|
||||
function checklogin(form){
|
||||
var phonenumFlg = true;
|
||||
var pwdFlg = true;
|
||||
if(!form.username.value || form.username.value.trim() === ''){
|
||||
$('#checkusername').text('账号不能为空').addClass("warning");
|
||||
phonenumFlg = false;
|
||||
} else {
|
||||
$('#checkusername').empty();
|
||||
}
|
||||
if(!form.password.value || form.password.value === ''){
|
||||
$('#checkpassword').text('密码不能为空').addClass("warning");
|
||||
pwdFlg = false;
|
||||
} else {
|
||||
$('#checkpassword').empty();
|
||||
}
|
||||
if(phonenumFlg && pwdFlg){
|
||||
$("#agent_login").off('submit').on("submit", function(event) {
|
||||
event.preventDefault();
|
||||
var $cover = $('#cover');
|
||||
$cover.addClass('show').css('display','flex');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/adminghd/Login/login",
|
||||
data: $(this).serialize(),
|
||||
success: function(data) {
|
||||
$cover.removeClass('show').hide();
|
||||
if(data.status){
|
||||
location.replace("/adminghd/login");
|
||||
} else {
|
||||
alert(data.msg);
|
||||
}
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
$cover.removeClass('show').hide();
|
||||
console.error("Error: " + textStatus);
|
||||
alert('登录请求失败,请稍后重试');
|
||||
}
|
||||
});
|
||||
});
|
||||
$("#agent_login").submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
<script type="text/javascript" src="/static/adminghd/js/jquery.js"></script>
|
||||
<script>
|
||||
var _login_time = -1;
|
||||
var _user_type = '';
|
||||
|
||||
function checklogin(form){
|
||||
var username = $('username').value;
|
||||
var pwd = $('password').value;
|
||||
var phonenumFlg = true;
|
||||
var pwdFlg = true;
|
||||
//var codeFlg = true;
|
||||
if(form.username.value == null || form.username.value == ""){
|
||||
$('#checkusername').empty();
|
||||
$('#checkusername').append(' 账号不能为空!');
|
||||
$('#checkusername').addClass("warning");
|
||||
phonenumFlg = false;
|
||||
return phonenumFlg;
|
||||
}else{
|
||||
$('#checkusername').empty();
|
||||
// $('#checkusername').append('<img src="/images/base/check_right.gif" width="13" height="13">');
|
||||
$('#checkusername').addClass("warning");
|
||||
}
|
||||
if(form.password.value == null || form.password.value == ""){
|
||||
$('#checkpassword').empty();
|
||||
$('#checkpassword').append(' 密码不能为空!');
|
||||
$('#checkpassword').addClass("warning");
|
||||
pwdFlg = false;
|
||||
return pwdFlg;
|
||||
}else{
|
||||
$('#checkpassword').empty();
|
||||
// $('#checkpassword').append('<img src="/images/base/check_right.gif" width="13" height="13">');
|
||||
$('#checkpassword').addClass("warning");
|
||||
}
|
||||
if(phonenumFlg == true && pwdFlg == true){
|
||||
// alert(11);
|
||||
$("#agent_login").submit(function(event) {
|
||||
event.preventDefault(); // 阻止表单默认提交行为
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "/adminghd/Login/login", // 服务器端脚本的 URL
|
||||
data: $(this).serialize(), // 自动序列化表单元素为字符串
|
||||
success: function(data) {
|
||||
if(data.status){
|
||||
//alert(data.msg);
|
||||
location.replace("/adminghd/login");
|
||||
// location.reload();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
return ;
|
||||
}
|
||||
console.log(response); // 处理服务器响应
|
||||
},
|
||||
error: function(jqXHR, textStatus, errorThrown) {
|
||||
console.error("Error submitting form: " + textStatus);
|
||||
}
|
||||
});
|
||||
});
|
||||
// $('#agent_login').submit();
|
||||
// ajaxpost('registerform', 'register');
|
||||
// $('#agent_login').ajaxSubmit({
|
||||
/* $.ajax({
|
||||
url:'/admin/Login/login',
|
||||
dataType:'json',
|
||||
type:'post',
|
||||
data:{
|
||||
"username":username,
|
||||
"password":pwd
|
||||
},
|
||||
success:function(data){
|
||||
alert(222);
|
||||
alert(data.msg);
|
||||
return false;
|
||||
if(data.status){
|
||||
alert(data.msg);
|
||||
// $(form).resetForm();
|
||||
} else {
|
||||
alert(data.msg);
|
||||
return ;
|
||||
}
|
||||
}
|
||||
}) */
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
Reference in New Issue
Block a user