<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
 <base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8"/>
<title>用户登录</title>

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta content="width=device-width, initial-scale=1.0" name="viewport"/>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta content="" name="description"/>
<meta content="" name="author"/>
<!-- BEGIN GLOBAL MANDATORY STYLES -->
<link href="plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<link href="plugins/simple-line-icons/simple-line-icons.min.css" rel="stylesheet" type="text/css"/>
 <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<link href="plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
<!-- END GLOBAL MANDATORY STYLES -->
<!-- BEGIN PAGE LEVEL STYLES -->
<link href="admin/login.css" rel="stylesheet" type="text/css"/>
<!-- END PAGE LEVEL SCRIPTS -->
<!-- BEGIN THEME STYLES -->
<link href="admin/components-md.css" id="style_components" rel="stylesheet" type="text/css"/>
<link href="admin/plugins-md.css" rel="stylesheet" type="text/css"/>
<link href="admin/layout/css/layout.css" rel="stylesheet" type="text/css"/>
<link href="admin/layout/css/themes/darkblue.css" rel="stylesheet" type="text/css" id="style_color"/>
<link href="admin/layout/css/custom.css" rel="stylesheet" type="text/css"/>
<!-- END THEME STYLES -->
<link rel="shortcut icon" href="favicon.ico"/>
	<style>
		.login{
			/*background-color: #209CDC;*/
			/*background-image: url('img/logo-aidi.jpg');*/
			/*background-size: 100%;*/
			background-repeat: no-repeat;
		}
		.login .content {
			margin: 10% auto auto auto;
			height: 500px;
		}
		.btn-success:hover, .btn-success:focus, .btn-success:active, .btn-success.active{
			background-color: #0060af;
		}
		.btn-success {
			background-color: #0060af;
		}
		
		.form-group {
			margin-bottom: 27px;
			position: relative;
		}
		.login .content{background-color: #fff;padding-bottom: 15px;}
		.login .content .form-actions .btn-success{    width: 100%;
			height: 43px;}
		.login .content .form-actions{border-bottom: none}
		body{
			height: 100%;
			overflow: hidden;
		}
		.form-title{
			font-size: 22px !important;text-align: left !important;

		}

		.btn-success{
			/*background-color:#00883c;*/
		}
		.btn-success:hover,  .btn-success:focus, .btn-success:active, .btn-success.active,.btn-success:active:hover, .btn-success.active:hover {
			/*background-color:#00883c;*/
}

.login .content .form-actions .btn-success {
    width: 100%;
    height: 48px;    font-size: 14px;
    border-radius: 4px;
}
.form-group img{
	position: absolute;
    top: 16px;
    left: 10px;
    width: 16px;
}
	</style>
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-md login">
<!-- BEGIN SIDEBAR TOGGLER BUTTON -->
<div class="menu-toggler sidebar-toggler">
</div>
<!-- END SIDEBAR TOGGLER BUTTON -->
<!-- BEGIN LOGO -->
<!--<div class="logo">
	东昌微信后台管理系统
</div> -->
<!-- END LOGO -->
<!-- BEGIN LOGIN -->
<div class="content">
	<!-- BEGIN LOGIN FORM -->
	<form class="login-form" action="#springUrl('/page/user/login')"    method="post">
		<input name="uuid" id="uuid" type="hidden">
		<h5 style="color:red;text-align: center;"></h5>
		<h3 class="form-title">用户登录<span style="color:#c3c5c6;font-size:18px;font-weight:normal;font-family:Vrinda;margin-left:12px">UserLogin</span></h3>
		<div class="alert alert-danger display-hide">
			<button class="close" data-close="alert"></button>
			<span>请输入用户名和密码 </span>
		</div>
		<div class="form-group">
			<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
			<label class="control-label visible-ie8 visible-ie9">用户名</label>
			<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="用户名" name="username"/>
			<img src="img/icon1.png" alt="">
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">密码</label>
			<input class="form-control form-control-solid placeholder-no-fix" type="password" autocomplete="off" placeholder="密码" name="password"/>
			<img src="img/icon2.png" alt="">
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">验证码</label>
			<input class="form-control form-control-solid placeholder-no-fix" type="text" autocomplete="off" placeholder="验证码" name="code"/>
			<img src="img/validate-code.png" alt="">
		</div>
		<img id="codeImg" src="" alt="" style="padding-bottom: 20px;">
		<div class="form-actions">
			<button type="submit" class="btn btn-success uppercase">登录</button>
<!-- 			<label class="rememberme check"> -->
<!-- 			<input type="checkbox" name="remember" value="1"/>保存 </label> -->
<!-- 			<a href="javascript:;" id="forget-password" class="forget-password">忘记密码?</a> -->
		</div>
	
<!-- 		<div class="create-account"> -->
<!-- 			<p> -->
<!-- 				<a href="javascript:;" id="register-btn" class="uppercase">创建账号</a> -->
<!-- 			</p> -->
<!-- 		</div> -->

		<input type="text" style="display: none" name="_csrf" value="${_csrf.token}"/>
		<input  type="text" style="display: none" name="_csrf_header" value="${_csrf.headerName}"/>


	</form>
	<!-- END LOGIN FORM -->
	<!-- BEGIN FORGOT PASSWORD FORM -->
<!-- 	<form class="forget-form" action="index.html" method="post"> -->
<!-- 		<h3>忘记密码 ?</h3> -->
<!-- 		<p> -->
<!-- 			 请输入您的邮件地址来重置你的密码. -->
<!-- 		</p> -->
<!-- 		<div class="form-group"> -->
<!-- 			<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="Email" name="email"/> -->
<!-- 		</div> -->
<!-- 		<div class="form-actions"> -->
<!-- 			<button type="button" id="back-btn" class="btn btn-default">返回</button> -->
<!-- 			<button type="submit" class="btn btn-success uppercase pull-right">提交</button> -->
<!-- 		</div> -->
<!-- 	</form> -->
	<!-- END FORGOT PASSWORD FORM -->
	<!-- BEGIN REGISTRATION FORM -->
	<form class="register-form" action="index.html" method="post">
		<h3>注册</h3>
		<p class="hint">
			 请输入您的个人信息:
		</p>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">姓名</label>
			<input class="form-control placeholder-no-fix" type="text" placeholder="姓名" name="fullname"/>
		</div>
		<div class="form-group">
			<!--ie8, ie9 does not support html5 placeholder, so we just show field title for that-->
			<label class="control-label visible-ie8 visible-ie9">Email</label>
			<input class="form-control placeholder-no-fix" type="text" placeholder="Email" name="email"/>
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">地址</label>
			<input class="form-control placeholder-no-fix" type="text" placeholder="企业地址" name="address"/>
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">城市</label>
			<input class="form-control placeholder-no-fix" type="text" placeholder="城市" name="city"/>
		</div>
		<p class="hint">
			 请输入您的账户信息:
		</p>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">登录名</label>
			<input class="form-control placeholder-no-fix" type="text" autocomplete="off" placeholder="登录名" name="username"/>
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">登录密码</label>
			<input class="form-control placeholder-no-fix" type="password" autocomplete="off" id="register_password" placeholder="登录密码" name="password"/>
		</div>
		<div class="form-group">
			<label class="control-label visible-ie8 visible-ie9">再次输入密码</label>
			<input class="form-control placeholder-no-fix" type="password" autocomplete="off" placeholder="再次输入密码" name="rpassword"/>
		</div>
		<div class="form-actions">
			<button type="button" id="register-back-btn" class="btn btn-default">返回</button>
			<button type="submit" id="register-submit-btn" class="btn btn-success uppercase pull-right">提交</button>
		</div>
	</form>
	<!-- END REGISTRATION FORM -->
</div>

<!-- END LOGIN -->
<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
<!-- BEGIN CORE PLUGINS -->
<!--[if lt IE 9]>
<script src="${ctxStatic}/assets/global/plugins/respond.min.js"></script>
<script src="${ctxStatic}/assets/global/plugins/excanvas.min.js"></script> 
<![endif]-->

   <script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
    <!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="plugins/jQuery/jquery-migrate.min.js" type="text/javascript"></script>
<script src="plugins/jQuery/jquery.blockui.min.js" type="text/javascript"></script>
<script src="plugins/jQuery/jquery.cokie.min.js" type="text/javascript"></script>
<script src="plugins/uniform/jquery.uniform.min.js" type="text/javascript"></script>
<script src="plugins/jquery-validation/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="plugins/security/sha256.js" type="text/javascript"></script>
<!-- END PAGE LEVEL PLUGINS -->
<!-- BEGIN PAGE LEVEL SCRIPTS -->
<script src="scripts/metronic.js" type="text/javascript"></script>
<script src="scripts/layout.js" type="text/javascript"></script>
<script src="scripts/demo.js" type="text/javascript"></script>
<script src="scripts/login.js" type="text/javascript"></script>
<!-- END PAGE LEVEL SCRIPTS -->
<script>

if(window !=top){  
    top.location.href=location.href;  
}  

jQuery(document).ready(function() {     
Metronic.init(); // init metronic core components
Layout.init(); // init current layout
Login.init();
Demo.init();
	if("$!{error}"!=null && "$!{error}"!=""){
	    if ("$!{error}" == 'captcha') {
            $('.alert-danger span').text("验证码错误");
            $('.alert-danger', $('.login-form')).show();
		} else {
            $('.alert-danger span').text("用户名或密码错误");
            $('.alert-danger', $('.login-form')).show();
		}

	}

	var uuid = function () {
        var s = [];
        var hexDigits = "0123456789abcdef";
        for (var i = 0; i < 36; i++) {
            s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
        }
        s[14] = "4";  // bits 12-15 of the time_hi_and_version field to 0010
        s[19] = hexDigits.substr((s[19] & 0x3) | 0x8, 1);  // bits 6-7 of the clock_seq_hi_and_reserved to 01
        s[8] = s[13] = s[18] = s[23] = "-";

        var uuid = s.join("");
        return uuid;
    }
	var uuidVal = uuid();
    $('#uuid').val(uuidVal);

    function getCode() {
        //图片
        $('#codeImg').attr("src", "#springUrl('/page/user/captcha.jpg')/?uuid="+uuidVal+"&_csrf="+$("input[name='_csrf']").val()+"&_csrf_header="+$("input[name='_csrf_header']").val());
	}
    getCode();

    $('#codeImg').on('click', function () {
		getCode();
    });

});
</script>
<!-- END JAVASCRIPTS -->
</body>
<!-- END BODY -->
</html>