You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
162 lines
6.7 KiB
162 lines
6.7 KiB
<!DOCTYPE HTML>
|
|
<html>
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="renderer" content="webkit|ie-comp|ie-stand">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
<title>吉林省普通高中学业水平合格性考试学生报名系统后台管理</title>
|
|
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
|
|
<!-- 手机端禁止缩放 -->
|
|
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
|
|
|
|
<link href="./css/public.css" rel="stylesheet" type="text/css" />
|
|
<link href="./css/SignIn.css" rel="stylesheet" type="text/css" />
|
|
<link href="./component/layui/css/layui.css" rel="stylesheet" type="text/css" />
|
|
|
|
</head>
|
|
|
|
<body>
|
|
<div class="all-content">
|
|
<div class="content clearfix">
|
|
<div class="left-agile">
|
|
<div class="left-txt">吉林省普通高中学业水平合格性考试<br>学生报名系统后台管理</div>
|
|
<div class="left-img">
|
|
<img src="./imgs/login.png" width="323" height="227">
|
|
</div>
|
|
</div>
|
|
<div class="right-content clearfix">
|
|
<div class="content-name">
|
|
<p style="font-size: 32px;text-align: center;line-height: 1.8;">
|
|
登 录</p>
|
|
</div>
|
|
<form action="" method="post">
|
|
<div class="user-name">
|
|
<div class="user-name-li">
|
|
<img src="./imgs/user-icon.png">
|
|
<input type="text" placeholder="用户名" name="loginName" id="usernameTxt">
|
|
</div>
|
|
</div>
|
|
<div class="password">
|
|
<div class="password-li">
|
|
<img src="./imgs/pass-word.png">
|
|
<input type="password" autocomplete="off" placeholder="密码" name="password" id="passwordTxt">
|
|
</div>
|
|
</div>
|
|
<div class="vcode">
|
|
<div class="vcode-li">
|
|
<img src="./imgs/v-code.png">
|
|
<input type="text" placeholder="验证码" autocomplete="off" name="captcha" id="captchaTxt">
|
|
<img class="vcode-img" id="userCaptchaImage" src="/dsBase/hk/getCaptcha" alt="点击图片刷新校验码"
|
|
style="cursor:pointer" onclick="javascript:refreshCaptcha()" />
|
|
</div>
|
|
</div>
|
|
|
|
<input id="loginBtn" class="input-button" type="button" value="登 录">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
©版权所有:吉林省教育考试院<span class="padding-5"> | </span>技术支持:东北师范大学理想软件股份有限公司
|
|
</div>
|
|
|
|
<script src="./js/jsencrypt.min.js"></script>
|
|
<script src="./component/layui/layui.js"></script>
|
|
|
|
|
|
<script>
|
|
layui.use(['form', 'laytpl', 'jquery'], function () {
|
|
let form = layui.form;
|
|
let $ = layui.jquery;
|
|
let laytpl = layui.laytpl;
|
|
|
|
//刷新验证码
|
|
|
|
window.refreshCaptcha = function () {
|
|
$("#userCaptchaImage").attr("src", "/dsBase/hk/getCaptcha?rnd=" + Math.random().toString().slice(-6));
|
|
}
|
|
|
|
$(document).keydown(function (event) {
|
|
if (event.keyCode === 13) {//回车键对应code值为13
|
|
doLogin();
|
|
}
|
|
});
|
|
|
|
function doLogin() {
|
|
var username = $("#usernameTxt").val();
|
|
var password = $("#passwordTxt").val();
|
|
var captcha = $("#captchaTxt").val();
|
|
|
|
userLogin(username, password, captcha);
|
|
}
|
|
|
|
//用户名登录
|
|
function userLogin(username, password, captcha) {
|
|
var publicKey = "-----BEGIN PUBLIC KEY-----\MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCcd+0zTY9Gn94iqkQJTlxYnEnCeFsLkk0a7hoAvi2B74VzDVV3xH0ZO9RkXvo1SgCB+uzbEWdrgQkzTqyjfTtgOguu3OnkVxIMJF34ibchTY0LWHGxq1m2gLGuVVqrlu1LtdV0X7xo/5zc8Mr+46veWb86kSpqe6rOAm69WWo5GwIDAQAB\-----END PUBLIC KEY-----";
|
|
var encrypt = new JSEncrypt();
|
|
encrypt.setPublicKey(publicKey);
|
|
|
|
if (userLoginCheck(username, password, captcha)) {
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: "/dsBase/hk/schoolLogin",
|
|
data: {
|
|
"username": username,
|
|
"password": encrypt.encrypt(password),
|
|
"captcha": captcha
|
|
},
|
|
async: false,
|
|
success: function (result) {
|
|
if (result.success) {
|
|
window.location.href = '/dsBase/view/hk/manage.html';
|
|
} else {
|
|
layer.msg(result.msg, {
|
|
icon: 2,
|
|
time: 2000
|
|
}, function () {
|
|
refreshCaptcha();
|
|
});
|
|
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//用户登录检查
|
|
function userLoginCheck(username, password, captcha) {
|
|
if (username == null || username == "") {
|
|
layer.msg("用户名不允许为空!", {
|
|
icon: 2,
|
|
time: 1500
|
|
});
|
|
return false;
|
|
}
|
|
if (password == null || password == "") {
|
|
layer.msg("密码不允许为空!", {
|
|
icon: 2,
|
|
time: 1500
|
|
});
|
|
return false;
|
|
}
|
|
if (captcha == null || captcha == "") {
|
|
layer.msg("验证码不允许为空!", {
|
|
icon: 2,
|
|
time: 1500
|
|
});
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
$("#loginBtn").click(function () {
|
|
doLogin();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |