<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/init.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="qrzk">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="${ctx }/resources/css/login.css" rel="stylesheet" type="text/css" />
<script src="${ctx }/resources/js/login/login.js" type="text/javascript"></script>
<script src="${ctx }/resources/js/jquery-1.11.1.js"></script>
<script type="text/javascript" src="${ctx }/resources/js/kissy/kissy-min.js"></script>
<script src="${ctx}/resources/js/lib/angular.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-resource.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-cookies.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-animate.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-locale_zh-ch.js"></script>
<script src="${ctx}/resources/js/lib/angular-ui-router.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-file-upload.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-busy.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-xeditable.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-strap.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-strap.tpl.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-toaster.min.js"></script>
<script src="${ctx}/resources/js/lib/angular-breadcrumb.min.js"></script>
<script src="${ctx}/resources/js/lib/select.min.js"></script>
<script src="${ctx}/resources/js/lib/smart-table.min.js"></script>
<script src="${ctx}/resources/js/lib/ngscrollbar.js"></script>
<script src="${ctx}/resources/js/lib/underscore.min.js"></script>
<script src="${ctx}/resources/js/lib/bootstrap.min.js"></script>

<script src="${ctx}/resources/js/app/config.js"></script>
<script src="${ctx}/resources/js/app/controller.js"></script>
<script src="${ctx}/resources/js/app/service.js"></script>
<script src="${ctx}/resources/js/app/filters.js"></script>
<script src="${ctx}/resources/js/app/directives.js"></script>
<title>系统登录</title>
</head>
<body ng-controller="LoginCtrl">
<div id="login">
	<div class=" header-wrap-{{appType.toLowerCase()}}"></div>
	<div class="banner">
		<div class="grid-1000 login-bgcolor">
	  		<div class="login-box">
				<form id="login-form" method="post" action="${ctx}/j_spring_security_check">
			
	 				<div class=" field field-username">
	        			<i class="username-bg"></i>
	        			<input id="loginName" type="text" name="j_username" class="field-input"  required="" />
	       			</div>
	       			<div class=" field field-password">
				   		<i class="passord-bg"></i>
				    	<input id="password" type="password" name="j_password" class="field-input"  required=""/>
				    </div>
				    <c:if test="${param.error == true}">
				    	<div class="error-box">账户名或登录密码不正确，请重新输入</div>
				    </c:if>
				    <p class="button">
					    <a id="loginBtn" href="#">登录</a>
				    </p>
			    </form>
		    </div>
			    
	    </div>
    </div>

	<div class="footer">
		<p>Copyright © 2011-2020 www.qmth.com.cn, All Rights Reserved</p>　
		<p>电话：027-87863577　客服邮箱：service@qmth.com.cn　建议使用：谷歌 、 火狐 或者 IE8及以上版本的浏览器</p>
	</div>


</div>
<script type="text/javascript">
$(function(){
//<c:if test="${param.error == true}">
//	$("#errP").show(0).delay(2000).hide(0);
//</c:if>

$("#login-form").submit(function(){
	$("#loginName").val($.trim($("#loginName").val()));
	$("#password").val($.trim($("#password").val()));
	if($("#loginName").val() == ""){
		alert("请输入用户名!");
		$("#loginName").focus();
		return false;
	}
	if($("#password").val() == ""){
		alert("请输入密码!");
		$("#password").focus();
		return false;
	}
	return true;
});

$("#loginName").focus();

	$("#loginBtn").click(function(){
		$("#login-form").submit();	
	});
	
	$("#loginName").keydown(function(e){
		var e = e || event;
		var keyNum = e.which || e.keyCode;
		if(keyNum==13){
			$("#password").focus();
		}
	});
	
	$("#password").keydown(function(e){
		var e = e || event;
		var keyNum = e.which || e.keyCode;
		if(keyNum==13){
			$("#login-form").submit();
		}
	});
	
});
</script>
</body>
</html>