|
@@ -67,6 +67,15 @@
|
|
</script>
|
|
</script>
|
|
<script type="text/javascript">
|
|
<script type="text/javascript">
|
|
$(document).ready(function() {
|
|
$(document).ready(function() {
|
|
|
|
+ var maxCount = $("#maxCount").val();
|
|
|
|
+ if (maxCount === "true") {
|
|
|
|
+ $("#loginButton").attr("disabled", true);
|
|
|
|
+ $("#lastMsg").text("登录失败次数超过限制,今日无法登录.");
|
|
|
|
+
|
|
|
|
+ localStorage.setItem("formDisabled", "true"); // 存储状态
|
|
|
|
+ }else {
|
|
|
|
+ localStorage.removeItem("formDisabled"); // 清除状态
|
|
|
|
+ }
|
|
$("#loginForm").validate({
|
|
$("#loginForm").validate({
|
|
rules: {
|
|
rules: {
|
|
validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
|
|
validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
|
|
@@ -90,29 +99,42 @@
|
|
});
|
|
});
|
|
|
|
|
|
$('#loginButton').click(function () {
|
|
$('#loginButton').click(function () {
|
|
|
|
+ event.preventDefault();
|
|
var username = $("#username").val();
|
|
var username = $("#username").val();
|
|
var password = $.md5(($("#password").val()));
|
|
var password = $.md5(($("#password").val()));
|
|
- $.ajax({
|
|
|
|
- type: "post",
|
|
|
|
- url: "${ctx}/sys/register/validatePassword",
|
|
|
|
- data: {loginName:username,password:password},
|
|
|
|
- dataType:"text",
|
|
|
|
- success: function(data) {
|
|
|
|
- if(data=="cf"){
|
|
|
|
|
|
+ $.ajax({
|
|
|
|
+ type: "post",
|
|
|
|
+ url: "${ctx}/sys/register/validatePassword",
|
|
|
|
+ data: {loginName:username,password:password},
|
|
|
|
+ dataType:"text",
|
|
|
|
+ success: function(data) {
|
|
|
|
+ console.log('data',data)
|
|
|
|
+
|
|
|
|
+ if(data=="false1"){
|
|
|
|
+ $("#lastMsg").text("登录失败次数超过限制,今日无法登录.");
|
|
|
|
+ // $("#loginForm").submit();
|
|
|
|
+ }
|
|
|
|
+ if(data=="cf"){
|
|
<%--layer.open({--%>
|
|
<%--layer.open({--%>
|
|
- <%--type: 2,--%>
|
|
|
|
- <%--area: ['40%', '40%'],--%>
|
|
|
|
- <%--title: '选择用户',--%>
|
|
|
|
- <%--maxmin: true, //开启最大化最小化按钮--%>
|
|
|
|
- <%--content: '${ctx}/workstaff/workStaffBasicInfo/repeatName?name='+username--%>
|
|
|
|
|
|
+ <%--type: 2,--%>
|
|
|
|
+ <%--area: ['40%', '40%'],--%>
|
|
|
|
+ <%--title: '选择用户',--%>
|
|
|
|
+ <%--maxmin: true, //开启最大化最小化按钮--%>
|
|
|
|
+ <%--content: '${ctx}/workstaff/workStaffBasicInfo/repeatName?name='+username--%>
|
|
<%--});--%>
|
|
<%--});--%>
|
|
|
|
|
|
} else if(data=="true"){
|
|
} else if(data=="true"){
|
|
- $("#loginButton").attr("disabled", true);
|
|
|
|
- // $("#loginForm").submit();
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ $("#loginButton").attr("disabled", true);
|
|
|
|
+ $("#loginForm").submit();
|
|
|
|
+ }else{
|
|
|
|
+ $("#loginForm").submit();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
}) ;
|
|
}) ;
|
|
|
|
|
|
<%--$('#loginButton1').click(function () {--%>
|
|
<%--$('#loginButton1').click(function () {--%>
|
|
@@ -543,6 +565,10 @@
|
|
.changeCode:hover{
|
|
.changeCode:hover{
|
|
color: red!important;
|
|
color: red!important;
|
|
}
|
|
}
|
|
|
|
+ .disabled {
|
|
|
|
+ pointer-events: none; /* 禁用点击事件 */
|
|
|
|
+ opacity: 0.5; /* 可选:使元素看起来更透明 */
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|
|
<%--<link id="layuicss-skincodecss" rel="stylesheet" href="./登录界面_files/code.css" media="all"></head>--%>
|
|
<%--<link id="layuicss-skincodecss" rel="stylesheet" href="./登录界面_files/code.css" media="all"></head>--%>
|
|
<body class="login-layout " style="overflow:auto;">
|
|
<body class="login-layout " style="overflow:auto;">
|
|
@@ -571,6 +597,7 @@
|
|
<div class="widget-main bound" style="height:350px;">
|
|
<div class="widget-main bound" style="height:350px;">
|
|
<form id="loginForm" class="form-signin" action="${ctx}/login" method="post" novalidate="novalidate">
|
|
<form id="loginForm" class="form-signin" action="${ctx}/login" method="post" novalidate="novalidate">
|
|
<fieldset>
|
|
<fieldset>
|
|
|
|
+ <input type="hidden" id="maxCount" value="${maxCount}">
|
|
<div style="height:50px"></div>
|
|
<div style="height:50px"></div>
|
|
<label class="block clearfix">
|
|
<label class="block clearfix">
|
|
<span class="block input-icon input-icon-right">
|
|
<span class="block input-icon input-icon-right">
|
|
@@ -589,7 +616,7 @@
|
|
<c:if test="${isValidateCodeLogin}">
|
|
<c:if test="${isValidateCodeLogin}">
|
|
<label class="block clearfix">
|
|
<label class="block clearfix">
|
|
<span class=" input-icon input-icon-right" style="display: flex">
|
|
<span class=" input-icon input-icon-right" style="display: flex">
|
|
- <input type="text" style="width: 200px" id="validateCode" name="validateCode" placeholder="验证码">
|
|
|
|
|
|
+ <input type="text" style="width: 200px" id="validateCode" name="validateCode" placeholder="验证码" class="form-control required">
|
|
<a style="text-decoration:none;" href="javascript:void(0);" rel="external nofollow" onclick="VerificationCode()">
|
|
<a style="text-decoration:none;" href="javascript:void(0);" rel="external nofollow" onclick="VerificationCode()">
|
|
<img style="margin-left: 5px" id="randCodeImage" alt="验证码" src="/getVerifyCode" width="100"/>
|
|
<img style="margin-left: 5px" id="randCodeImage" alt="验证码" src="/getVerifyCode" width="100"/>
|
|
<span class="changeCode" style="font-size: 12px;font-weight: 200;color: dodgerblue">验证码刷新</span>
|
|
<span class="changeCode" style="font-size: 12px;font-weight: 200;color: dodgerblue">验证码刷新</span>
|
|
@@ -598,7 +625,7 @@
|
|
<span id="errorMsg" class="help-inline"></span>
|
|
<span id="errorMsg" class="help-inline"></span>
|
|
</label>
|
|
</label>
|
|
</c:if>
|
|
</c:if>
|
|
-
|
|
|
|
|
|
+ <span id="lastMsg" class="help-inline" style="color: red;"></span>
|
|
|
|
|
|
|
|
|
|
<!-- <button type="button" id="getCompanyBtn" style="vertical-align:middle " class="dropdown" value="获取企业">我的企业</button>
|
|
<!-- <button type="button" id="getCompanyBtn" style="vertical-align:middle " class="dropdown" value="获取企业">我的企业</button>
|
|
@@ -660,7 +687,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- <div class="form-options option1 clearfix">
|
|
|
|
|
|
+ <div class="form-options option1 clearfix" id="formOptions">
|
|
<div style="width: 20px;height: auto" class="pull-left">
|
|
<div style="width: 20px;height: auto" class="pull-left">
|
|
|
|
|
|
</div>
|
|
</div>
|