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.
147 lines
5.9 KiB
147 lines
5.9 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="./pcss/public.css" rel="stylesheet" type="text/css" />
|
|
<link href="./pcss/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">长春市教育数据采集系统</div>
|
|
<div class="left-img">
|
|
<img src="./pimgs/image.png" width="475" height="230">
|
|
</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="./pimgs/user-icon.png">
|
|
<input type="text" placeholder="用户名" name="loginName" id="usernameTxt">
|
|
</div>
|
|
</div>
|
|
<div class="password">
|
|
<div class="password-li">
|
|
<img src="./pimgs/pass-word.png">
|
|
<input type="password" autocomplete="off" placeholder="密码" name="password" id="passwordTxt">
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<input id="loginBtn" class="input-button" type="button" value="登 录" style="background: linear-gradient(153.969deg, rgb(178, 210, 255) 2.66501%, rgb(75, 148, 251) 80.9433%);;">
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="footer">
|
|
©版权所有:长春市教育技术装备与信息中心<span class="padding-5"> | </span>技术支持:东北师范大学理想软件股份有限公司
|
|
</div>
|
|
|
|
<script src="./component/pear/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/collect/doFillLogin",
|
|
data: {
|
|
"username": username,
|
|
"password": encrypt.encrypt(password)
|
|
},
|
|
async: false,
|
|
success: function (result) {
|
|
if (result.success) {
|
|
location.href = "pindex.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;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
$("#loginBtn").click(function () {
|
|
doLogin();
|
|
});
|
|
|
|
});
|
|
</script>
|
|
</body>
|
|
|
|
</html> |