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.
173 lines
6.6 KiB
173 lines
6.6 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"/>
|
|
<meta name="keywords" content="长春市教育技术装备与信息中心职称投票系统">
|
|
<!--关键词,5个左右,单个8汉字以内-->
|
|
<meta name="description" content="长春市教育技术装备与信息中心职称投票系统">
|
|
<!--网站描述-->
|
|
<!--自己的样式-->
|
|
<link href="css/public.css" rel="stylesheet" type="text/css"/>
|
|
<link href="css/SignIn.css" rel="stylesheet" type="text/css">
|
|
<script src="lib/jsencrypt.min.js"></script>
|
|
<script src="lib/jquery-3.6.0.min.js"></script>
|
|
<!--添加对公用函数库的引用-->
|
|
<!-- <script src="lib/common.js"></script>-->
|
|
</head>
|
|
|
|
<body>
|
|
<div class="all-content">
|
|
<div class="content clearfix">
|
|
<div class="left-img">
|
|
<img src="img/left-img.png">
|
|
</div>
|
|
<div class="right-content clearfix">
|
|
<div class="content-name" style="text-align: center">
|
|
<p style="font-size: 24px;font-weight: bolder">长春市教育技术装备与信息中心<br>职称投票系统</p>
|
|
</div>
|
|
<form action="" method="post">
|
|
<div class="user-name">
|
|
<div class="user-name-li">
|
|
<img src="img/user-icon.png">
|
|
<input type="text" placeholder="用户名" name="loginName" id="usernameTxt">
|
|
</div>
|
|
</div>
|
|
<div class="password">
|
|
<div class="password-li">
|
|
<img src="img/pass-word.png">
|
|
<input type="password" autocomplete="off" placeholder="密码" name="password" id="passwordTxt">
|
|
</div>
|
|
</div>
|
|
<div class="vcode">
|
|
<div class="vcode-li">
|
|
<img src="img/v-code.png">
|
|
<input type="text" placeholder="验证码" autocomplete="off" name="captcha" id="captchaTxt">
|
|
<img class="vcode-img" id="userCaptchaImage" src="/FengHuang/loginPerson/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">
|
|
©版权所有 2020-2022 长春市教育局装备信息与技术中心<span class="padding-5"> | </span><a
|
|
href="https://beian.miit.gov.cn/" target="_blank">吉ICP备20000186号-1</a>
|
|
</div>
|
|
|
|
<script>
|
|
$(function () {
|
|
$("#loginBtn").click(function () {
|
|
doLogin();
|
|
});
|
|
});
|
|
|
|
//刷新验证码
|
|
function refreshCaptcha() {
|
|
$("#userCaptchaImage").attr("src", "/FengHuang/loginPerson/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();
|
|
if (username.length === 0 || password.length === 0) {
|
|
alert("用户名或密码不允许为空!")
|
|
return;
|
|
}
|
|
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: "/FengHuang/loginPerson/touPiaodoLogin",
|
|
data: {
|
|
"username": username,
|
|
"password": encrypt.encrypt(password),
|
|
"captcha": captcha
|
|
},
|
|
async: false,
|
|
success: function (result) {
|
|
if (result.success) {
|
|
window.location.href = '/FengHuang/html/tp/index.html';
|
|
} else {
|
|
alert(result.message);
|
|
refreshCaptcha();
|
|
}
|
|
}
|
|
});
|
|
}
|
|
}
|
|
|
|
//用户登录检查
|
|
function userLoginCheck(username, password, captcha) {
|
|
if (username == null || username == "") {
|
|
alert("用户名不允许为空!");
|
|
return false;
|
|
}
|
|
if (password == null || password == "") {
|
|
alert("密码不允许为空!");
|
|
return false;
|
|
}
|
|
if (captcha == null || captcha == "") {
|
|
alert("验证码不允许为空!");
|
|
return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
//开启错误提示
|
|
function showError(error) {
|
|
$(".form-error").find("label").html(error);
|
|
$(".form-error").show();
|
|
}
|
|
|
|
|
|
|
|
//获取页面信息
|
|
function getPageInfo() {
|
|
$.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: "/FengHuang/global/getGlobalValueByKey",
|
|
data: {
|
|
"key": "title,copy_right"
|
|
},
|
|
async: false,
|
|
success: function (result) {
|
|
if (result.success) {
|
|
$("#system_name").html(result.title);
|
|
$("#copyright").html(result.copy_right);
|
|
$('title').html(result.title);
|
|
//存储csrf_token到本地存储器
|
|
//setCsrfLocalStorage(result);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |