Browse Source

弹窗提示

H-SEN 7 years ago
parent
commit
0448cb5a3d

+ 15 - 7
tooth-wechat-web/src/main/webapp/WEB-INF/views/admin/main/login.jsp

@@ -45,12 +45,12 @@
 				<h3>用户登录</h3>
 				<h3>用户登录</h3>
 				<input type="hidden"
 				<input type="hidden"
 					value="<%=session.getAttribute("loginToken")%>" name="loginToken">
 					value="<%=session.getAttribute("loginToken")%>" name="loginToken">
-				<c:if test="${!empty isShowDiv}">
+				<%--<c:if test="${!empty isShowDiv}">
 				<c:choose>
 				<c:choose>
 					<c:when test="${isShowDiv == true }">
 					<c:when test="${isShowDiv == true }">
 						<div id="errorDiv"
 						<div id="errorDiv"
 							style="margin-left: 20%; width: 60%; border: 1px solid rgb(235, 204, 209); background-color: rgb(242, 222, 222);" class=".Validform_wrong">
 							style="margin-left: 20%; width: 60%; border: 1px solid rgb(235, 204, 209); background-color: rgb(242, 222, 222);" class=".Validform_wrong">
-							<span id="errinfo" style="color: #A94442; font-size: 13px;">${divText }</span>
+							<span id="errinfo" style="color: #A94442; font-size: 13px;" >${divText }</span>
 							<span id="closediv"
 							<span id="closediv"
 								style="width: 20px; height: 20px; text-align: center; float: right; cursor: pointer;">x</span>
 								style="width: 20px; height: 20px; text-align: center; float: right; cursor: pointer;">x</span>
 						</div>
 						</div>
@@ -64,7 +64,7 @@
 						</div>
 						</div>
 					</c:otherwise>
 					</c:otherwise>
 				</c:choose>
 				</c:choose>
-				</c:if>
+				</c:if>--%>
 				<div class="row cl">
 				<div class="row cl">
 					<label class="form-label col-3"><i class="Hui-iconfont c-red">&#xe60d;</i></label>
 					<label class="form-label col-3"><i class="Hui-iconfont c-red">&#xe60d;</i></label>
 					<div class="formControls col-8">
 					<div class="formControls col-8">
@@ -86,7 +86,7 @@
 							onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:"
 							onclick="if(this.value=='验证码:'){this.value='';}" value="验证码:"
 							style="width: 150px;"> <img
 							style="width: 150px;"> <img
 							src="${pageContext.request.contextPath }/verify.image"
 							src="${pageContext.request.contextPath }/verify.image"
-							id="verifyCode"> <a id="kanbuq" href="javascript:;">看不清,换一张</a>
+							id="veriCode"> <a id="kanbuq" href="javascript:;">看不清,换一张</a>
 					</div>
 					</div>
 				</div>
 				</div>
 				<br/>
 				<br/>
@@ -114,10 +114,18 @@
             }
             }
         }
         }
 
 
+        $(function(){
+            var msg = '${divText}';
+            var sattus = "${status}";
+            if(sattus!=null&&sattus != 500&&sattus != ""&&typeof(sattus)!= undefined){
+                layer.msg(msg,{icon: 5,time:2000});;
+			}
+		})
+
 
 
 		$(function() {
 		$(function() {
 			$("#kanbuq").click(function() {
 			$("#kanbuq").click(function() {
-				$("#verifyCode").attr("src", "${pageContext.request.contextPath }/verify.image?date=" + new Date().getTime());
+				$("#veriCode").attr("src", "${pageContext.request.contextPath }/verify.image?date=" + new Date().getTime());
 				return false;//取消动作
 				return false;//取消动作
 			});
 			});
 			$("#closediv").click(function() {
 			$("#closediv").click(function() {
@@ -175,10 +183,10 @@
 				return false;
 				return false;
 			}
 			}
 			var verifyCode = $("#verifyCode").val();
 			var verifyCode = $("#verifyCode").val();
-			if (verifyCode.length != 6) {
+			if (verifyCode.length != 4) {
 				$("#verifyCode").select();
 				$("#verifyCode").select();
 				//$("#errorDiv").show(100);
 				//$("#errorDiv").show(100);
-                layer.msg('验证码必须为6位!',{icon: 5,time:2000});
+                layer.msg('验证码必须为4位!',{icon: 5,time:2000});
 				return false;
 				return false;
 			}
 			}
 			$("#adminLoginPwd").val(hex_md5(adminLoginPwd));
 			$("#adminLoginPwd").val(hex_md5(adminLoginPwd));