<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter"%>
<%@ include file="/webpage/include/taglib.jsp"%>
<!DOCTYPE html>
<html>

<head>
	<link rel="icon" href="${ctxp}/static/common/img/bitbug_favicon.ico" type="image/x-icon"/>
	<meta name="description" content="User login page" />
	<meta name="viewport" content="width=device-width, initial-scale=1.0" />
	<script src="${ctxStatic}/jquery/jquery-2.1.1.min.js" type="text/javascript"></script>
	<script src="${ctxStatic}/jquery/jquery-migrate-1.1.1.min.js" type="text/javascript"></script>
	<script src="${ctxStatic}/jquery-validation/1.14.0/jquery.validate.js" type="text/javascript"></script>
	<script src="${ctxStatic}/jquery-validation/1.14.0/localization/messages_zh.min.js" type="text/javascript"></script>
	<script src="${ctxStatic}/jquery/md5.js" type="text/javascript"></script>
	<link href="${ctxStatic}/bootstrap/3.3.4/css_default/bootstrap.min.css" type="text/css" rel="stylesheet" />
	<script src="${ctxStatic}/bootstrap/3.3.4/js/bootstrap.min.js"  type="text/javascript"></script>
	<link href="${ctxStatic}/awesome/4.4/css/font-awesome.min.css" rel="stylesheet" />
	<!-- jeeplus -->
	<link href="${ctxStatic}/common/jeeplus.css" type="text/css" rel="stylesheet" />
	<script src="${ctxStatic}/common/jeeplus.js" type="text/javascript"></script>
	<link rel="shortcut icon" href="images/favicon.png" type="image/png">
	<!-- text fonts -->
	<link rel="stylesheet" href="${ctxStatic }/common/login/ace-fonts.css" />

	<!-- ace styles -->
	<link rel="stylesheet" href="${ctxStatic }/common/login/ace.css" />


	<!-- 引入layer插件 -->
	<script src="${ctxStatic}/layer-v2.3/layer/layer.js"></script>
	<script src="${ctxStatic}/layer-v2.3/layer/laydate/laydate.js"></script>

    <link rel="stylesheet" href="${ctxp}/static/common/css/style_bj.css">



	<!--[if lte IE 9]>
	<link rel="stylesheet" href="../assets/css/ace-part2.css" />
	<![endif]-->
	<link rel="stylesheet" href="${ctxStatic}/common/login/ace-rtl.css" />
    <style type="text/css">
        .b_f{
            background: #ffffffb5;
        }

        .bound{
            background-color: #ffffff70;
            /*background-color: rgba(255, 255, 255, 0.95);*/
            /*border-radius: 8px;*/
        }
        .login-layout .widget-box .widget-main {
            padding: 16px 36px;
            background: #ffffff70;

        }
        #tel-error{
            left:120px;
        }

    </style>
	<title>登录界面</title>
	<script>
        if (window.top !== window.self) {
            window.top.location = window.location;
        }
	</script>
	<script type="text/javascript">
        $(document).ready(function() {
            $("#loginForm").validate({
                rules: {
                    validateCode: {remote: "${pageContext.request.contextPath}/servlet/validateCodeServlet"}
                },
                messages: {
                    username: {required: "请填写用户名."},password: {required: "请填写密码."},
                    validateCode: {remote: "验证码不正确.", required: "请填写验证码."}
                },
                errorLabelContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    error.appendTo($("#loginError").parent());
                }
            });

            $('#loginButton').click(function () {
                var username = $("#username").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"){
							<%--layer.open({--%>
								<%--type: 2,--%>
								<%--area: ['40%', '40%'],--%>
								<%--title: '选择用户',--%>
								<%--maxmin: true, //开启最大化最小化按钮--%>
								<%--content: '${ctx}/workstaff/workStaffBasicInfo/repeatName?name='+username--%>
							<%--});--%>

						} else if(data=="true"){
                            $("#loginButton").attr("disabled", true);
                            // $("#loginForm").submit();
                        }
                    }
                })
            }) ;

			<%--$('#loginButton1').click(function () {--%>
				<%--var username = $("#username").val();--%>
				<%--var password = $.md5(($("#password").val()));--%>
				<%--$.ajax({--%>
					<%--type: "post",--%>
					<%--url: "${ctx}/sys/register/users",--%>
					<%--data: {loginName:username,password:password},--%>
					<%--dataType:"text",--%>
					<%--success: function(data) {--%>
						<%--if(data=="false"){--%>
							<%--alert("1111")--%>
							<%--layer.open({--%>
								<%--type: 2,--%>
								<%--area: ['40%', '40%'],--%>
								<%--title: '选择用户',--%>
								<%--maxmin: true, //开启最大化最小化按钮--%>
								<%--content: '${ctx}/workstaff/workStaffBasicInfo/repeatName?name='+username--%>
							<%--});--%>
						<%--} else if(data=="true"){--%>
							<%--// $("#loginButton").attr("disabled", true);--%>
							<%--// $("#loginForm").submit();--%>
							<%--alert("111")--%>
							<%--$("#loginButton").trigger("click");--%>

						<%--}--%>
					<%--}--%>
				<%--})--%>
			<%--}) ;--%>

        });
        // 如果在框架或在对话框中，则
		// 弹出提示并跳转到首页
        if(self.frameElement && self.frameElement.tagName == "IFRAME" || $('#left').length > 0 || $('.jbox').length > 0){
            top.location = "${ctx}";
        }
	</script>
	<script type="text/javascript">
        $(document).ready(function() {
            // 手机号码验证
            jQuery.validator.addMethod("isMobile", function(value, element) {
                var length = value.length;
                var mobile = /^(13[0-9]{9})|(18[0-9]{9})|(19[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
                return (length == 11 && mobile.test(value));
            }, "请正确填写您的手机号码");
            // 密码码验证
            jQuery.validator.addMethod("isPassword", function(value, element) {
                var mobile = /^[0-9a-zA-Z]+$/;
                return (mobile.test(value));
            }, "设置密码必须为6-12位数字、大小写字母的组合");

            $.validator.addMethod("checkPassword",function(value,element,params){
                var regExp = /^[0-9A-Za-z]{6,12}$/;
                return this.optional(element)||(regExp.test(value));
            },"密码必须为6-12位数字或大小写字母!");

            $("#inputForm").validate({
                rules: {
                    loginName: {remote: "${ctx}/sys/user/validateLoginName"},
                    mobile: {remote: "${ctx}/sys/user/validateMobile"},
                    randomCode: {
                        remote:{
                            url:"${ctx}/sys/register/validateMobileCode",
                            data:{
                                mobile:function(){
                                    return $("#tel").val();
                                }
                            }
                        }
                    }
                },
                messages: {
                    confirmNewPassword: {equalTo: "输入与上面相同的密码"},
                    ck1: {required: "必须接受用户协议."},
                    loginName: {remote: "此用户名已经被注册!", required: "用户名不能为空."},
                    mobile:{remote: "此手机号已经被注册!", required: "手机号不能为空."},
                    randomCode:{remote: "验证码不正确!", required: "验证码不能为空."}
                },
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });

            $("#resetForm").validate({
                rules: {
                    mobile: {remote: "${ctx}/sys/user/validateMobileExist"},
                    randomCode: {
                        remote:{
                            url:"${ctx}/sys/register/validateMobileCode",
                            data:{
                                mobile:function(){
                                    return $("#tel_resetpass").val();
                                }
                            }
                        }
                    },
                    password:{
                        checkPassword: true,
					},
                    confirmNewPassword:{
                        checkPassword: true,
					}
                },
                messages: {
                    mobile:{remote: "此手机号未注册!", required: "手机号不能为空."},
                    rconfirmNewPassword: {equalTo: "输入与上面相同的密码"},
                    randomCode:{remote: "验证码不正确!", required: "验证码不能为空."}
                },
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });

            $("#randomCodeLoginForm").validate({
                rules: {
                    //username: {remote: "${ctx}/sys/user/validateMobileExist"},
                    username: {
                        remote:{
                            url:"${ctx}/sys/user/validateMobileExist",
                            data:{
                                mobile:function(){
                                    return $("#tel_getRandomCode").val();
                                }
                            }
                        }
                    },
                    randomCode: {
                        remote:{
                            url:"${ctx}/sys/register/validateMobileCode",
                            data:{
                                mobile:function(){
                                    return $("#tel_getRandomCode").val();
                                }
                            }
                        }
                    }
                },
                messages: {
                    username:{remote: "此手机号未注册!", required: "手机号不能为空."},
                    randomCode:{remote: "验证码不正确!", required: "验证码不能为空."}
                },
                submitHandler: function(form){
                    loading('正在提交，请稍等...');
                    form.submit();
                },
                errorContainer: "#messageBox",
                errorPlacement: function(error, element) {
                    $("#messageBox").text("输入有误，请先更正。");
                    if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
                        error.appendTo(element.parent().parent());
                    } else {
                        error.insertAfter(element);
                    }
                }
            });


            /*修改密码*/
            $('#sendPassBtn').click(function () {
                if($("#tel_resetpass").val()=="" || $("#tel_resetpass-error").text()!=""){
                    top.layer.alert("请输入有效的手机号码！", {icon: 0});//讨厌的白色字体问题
                    return;

                }
                $("#sendPassBtn").attr("disabled", true);
                $.get("${ctx}/sys/register/getRegisterCode?mobile="+$("#tel_resetpass").val()+"&type="+"resetPassword",function(data){
                    if(data.success == false){
                        //top.layer.alert(data.msg, {icon: 0});讨厌的白色字体问题
                        alert(data.msg);
                        $("#sendPassBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                });
                var count = 60;
                var countdown = setInterval(CountDown, 1000);
                function CountDown() {
                    $("#sendPassBtn").attr("disabled", true);
                    $("#sendPassBtn").html("等待 " + count + "秒!");
                    if (count == 0) {
                        $("#sendPassBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                    count--;
                }
            }) ;
            /*用户注册*/
            $('#sendCodeBtn').click(function () {
                if($("#tel").val()=="" || $("#tel-error").text()!=""){
                    top.layer.alert("请输入有效的注册手机号码！", {icon: 0});//讨厌的白色字体问题
                    return;
                }
                $("#sendCodeBtn").attr("disabled", true);
                $.get("${ctx}/sys/register/getRegisterCode?mobile="+$("#tel").val(),function(data){
                    if(data.success == false){
                        //top.layer.alert(data.msg, {icon: 0});讨厌的白色字体问题
                        alert(data.msg);
                        $("#sendCodeBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                });
                var count = 60;
                var countdown = setInterval(CountDown, 1000);
                function CountDown() {
                    $("#sendCodeBtn").attr("disabled", true);
                    $("#sendCodeBtn").html("等待 " + count + "秒!");
                    if (count == 0) {
                        $("#sendCodeBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                    count--;
                }
            }) ;
			/*快速登录*/
            $('#sendRandomCodeBtn').click(function () {
                var mobile = $("#tel_getRandomCode").val().trim();
                var mobileRule = /^(13[0-9]{9})|(18[0-9]{9})|(14[0-9]{9})|(17[0-9]{9})|(15[0-9]{9})$/;
                if(mobile.length != 11 || !mobileRule.test(mobile) || $("#tel_getRandomCode-error").text()!=""){
                    top.layer.alert("请输入有效的手机号码！", {icon: 0});//讨厌的白色字体问题
                    return false;
                }

                $("#sendRandomCodeBtn").attr("disabled", true);
                $.get("${ctx}/login/getRandomCode?type=2&mobile="+$("#tel_getRandomCode").val(),function(data){
                    if(data.success == false){
                        top.layer.alert(data.msg, {icon: 0});//讨厌的白色字体问题
                        $("#sendRandomCodeBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                });
                var count = 60;
                var countdown = setInterval(CountDown, 1000);
                function CountDown() {
                    $("#sendRandomCodeBtn").attr("disabled", true);
                    $("#sendRandomCodeBtn").html("等待 " + count + "秒!");
                    if (count == 0) {
                        $("#sendRandomCodeBtn").html("重新发送").removeAttr("disabled");
                        clearInterval(countdown);
                    }
                    count--;
                }
            }) ;

            //默认不显示下拉框
            $("select").hide();
            $("#username").bind('input propertychange',function () {
                if($("#username").val().trim()==""){
                    $("#password").val("");
				}
                $("#span").empty();
                compSelect();
            });
            $("#password").blur(function(){
                if($("#username").val()==""){
                    $("#span").empty();
                    $("#span").html("请输入有效的用户名！");
                    return;
                }
                if($("#password").val()==""){
                    $("#span").empty();
                    $("#span").html("请输入有效的密码！");
                    return;

                }
                $("#span").empty();
                //top.layer.alert("请选择您的企业！", {icon: 0});//讨厌的白色字体问题

            });
            compSelect();
        });

        function compSelect() {
            var val = $("#username").val();
            if(val==null||val.trim()==''){
                return;
            }
            $.get("${ctx}/sys/user/getComName?userName="+ val,function(data){
                if(data.success == false){
                    /*top.layer.alert(data.msg, {icon: 0});*///讨厌的白色字体问题
                }else{
                    var selectItem = "<option value='{0}' > {1}</option>";     //下拉框选项
                    var selectedItem = "<option value='{0}'  selected='selected' > {1}</option>";    //默认被选择的下拉框选项
                    var item = "<select id='companyName' name='companyName'> ";
                    var result =data.msg.split(",");  //result是你后台获取的数组，是你需要动态生成下拉框的数据,此处为了方便，写成常量了

                    var rankLevel = data.comName;//同上
                    for (var i = 0; i < result.length; i++) {
                        if (result[i] === rankLevel) {
                            item += String.format(selectedItem, result[i], result[i]);    //第一个result[i]就是给selectItem里的｛0｝赋值(option的value)，第二个result[i]即｛1｝，此处是设置默认被选中的option
                        } else {
                            item += String.format(selectItem, result[i], result[i]);  //此处是设置不选中的option
                        }
                    }
                    item += "</select>";
                    $("#companySwitch").empty();   //先清空
                    $("#companySwitch").append(item);  //再赋值
                    if(result.length<2){
                        $("select").hide();
                    }

                }
            });
        }
	</script>
	<script type="text/javascript">
        $(document).ready(function() {
            if(navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)){//如果是移动端，就使用自适应大小弹窗
                width='auto';
                height='auto';
            }else{//如果是PC端，根据用户设置的width和height显示。
                width='700px';
                height='500px';
            }

            String.format = function ()
            {
                var param = [];
                for (var i = 0, l = arguments.length; i < l; i++)
                {
                    param.push(arguments[i]);
                }
                var statment = param[0]; // get the first element(the original statement)
                param.shift(); // remove the first element from array
                return statment.replace(/\{(\d+)\}/g, function(m, n)
                {
                    return param[n];
                });
            }

        });


	</script>

	<style>
		body,
		html {
			margin: 0;
			padding: 0;
			width: 100%;
			height: 100%;
			position: relative;
			/*font-family: sans-serif;*/
			/*font-size: 16px;*/
			background: linear-gradient(141deg, #0fb8ad 0%, #76f1ff 51%, #2cb5e8 75%);
			overflow: hidden;
		}
		.login-layout .widget-box{
			background-color: unset;
			background-color:transparent;
			padding: 0px;
			margin:0px;
			border: none;
		}
		.login-title{

		}
		.login-title span{
			display: block;
			font-size: 14px;
			color: #ffffff;
			line-height: 35px;
			text-align: left;
			text-indent: 10px;
			background: #ffffff57;
		}
		.login-layout .widget-box .widget-main{
			padding: 0 50px 10px 50px;
		}
		.login-layout label.block {
			margin-bottom: 0px;
			height: 54px;
		}
		.login-layout label.block.common {
			margin-bottom: 0px;
			height: 68px;
		}
		button.btn{
			height:34px;
		}
		.form-options a font{
			height:20px;
			line-height: 20px;
			display: inline-block;
		}
		.form-options.option1{
			padding-top: 24px;
		}
		#companyName{
			width: 100%;
			height: 34px;
			margin-bottom: 20px;
		}
		#companySwitch{
			/*height:68px;*/
		}
		.help-inline{
			color: red;
			font-size: 12px;
		}
	</style>
	<%--<link id="layuicss-skincodecss" rel="stylesheet" href="./登录界面_files/code.css" media="all"></head>--%>
<body class="login-layout " style="overflow:auto;">



<div id="holder"></div>
<script src="${ctxp}/static/common/js/index_bj.js"></script>

<%--<svg id="ckLine" style="position: absolute;" xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><path d="M 434,0 L 54,526" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="648.9036865234375" stroke-dashoffset="648.9036865234375" style="stroke-dashoffset: 0px; opacity: 0.185849;"></path><path d="M 0,233.475612922688 L 1583,50.32246456005171" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="1593.5601806640625" stroke-dashoffset="1593.5601806640625" style="stroke-dashoffset: 0px;"></path><path d="M 1583,180.7666872861694 L 0,414.9676407272431" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="1600.23095703125" stroke-dashoffset="1600.23095703125" style="stroke-dashoffset: 0px;"></path><path d="M 866,526 L 507,0" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="636.8335571289062" stroke-dashoffset="636.8335571289062" style="stroke-dashoffset: 0px;"></path><path d="M 866,526 L 996,0" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="541.8265380859375" stroke-dashoffset="541.8265380859375" style="stroke-dashoffset: 0px;"></path><path d="M 1583,509.92983002904145 L 0,280.8235476833331" stroke-width="2" stroke="rgba(255,255,255,0.4)" class="line off" stroke-dasharray="1599.4932861328125" stroke-dashoffset="1599.4932861328125" style="stroke-dashoffset: 610.026px;"></path></svg>--%>

<div id="popupFormDiv" style="display:none;"></div>
<div class="main-container">
	<div class="main-content">
		<div class="row">
			<div style="padding-bottom: 20px;">
				<div style="position:relative;width:1000px;margin-left: auto;margin-right: auto;">




					<div style="margin-top: 100px;">

						<div style="width:600px;margin:auto">
							<img src="${ctxp}/static/common/login/images/top-name2.png">
							<div id="login-box" class="login-box visible widget-box">
								<div class="login-title">
									<span>用户登录</span>
								</div>
								<div class="widget-body bound">
									<div class="widget-main bound" style="height:300px;">
										<form id="loginForm" class="form-signin" action="${ctx}/login" method="post" novalidate="novalidate">
											<fieldset>
												<div style="height:50px"></div>
												<label class="block clearfix">
															<span class="block input-icon input-icon-right">
																<input type="text" id="username" name="username" class="form-control required" value="" placeholder="登录名" aria-required="true">
																<i class="ace-icon fa fa-user"></i>
															</span>
												</label>

												<label class="block clearfix">
															<span class="block input-icon input-icon-right">
																<input type="password" id="password" name="password" value="" class="form-control required" placeholder="密码" aria-required="true">
																<i class="ace-icon fa fa-lock"></i>
															</span>
													<span id="span" class="help-inline"></span>
												</label>


												<!-- 										<button type="button" id="getCompanyBtn" style="vertical-align:middle " class="dropdown" value="获取企业">我的企业</button>
							 -->
												<div id="companySwitch" style="vertical-align:middle ;min-height:20px;">

													<select id="companyName" name="companyName" style="display:none;">

														<option value="0" selected="selected">默认企业</option>

													</select>

												</div>


												<div class="clearfix">
													<label class="inline" style="line-height:34px;margin-bottom:0px;">
														<input type="checkbox" id="rememberMe" name="rememberMe" class="ace">
														<span class="lbl"> 记住我</span>
													</label>

													<button id="loginButton" type="submit" class="width-65 pull-right btn btn-sm btn-primary">
														<i class="ace-icon fa fa-key"></i>
														<span class="bigger-110">登录</span>
													</button>
												</div>


												<div id="themeSwitch" class="dropdown">
													<a class="dropdown-toggle" data-toggle="dropdown" href="javascript:void(0)"></a>
													<ul class="dropdown-menu">
														<li><a href="javascript:void(0)" onclick="location=&#39;/total_process/theme/cerulean?url=&#39;+location.href"><font color="black">默认主题</font></a></li><li><a href="javascript:void(0)" onclick="location=&#39;/total_process/theme/cerulean?url=&#39;+location.href"><font color="black">ACE风格</font></a></li><li><a href="javascript:void(0)" onclick="location=&#39;/total_process/theme/cerulean?url=&#39;+location.href"><font color="black">天蓝主题</font></a></li><li><a href="javascript:void(0)" onclick="location=&#39;/total_process/theme/cerulean?url=&#39;+location.href"><font color="black">橙色主题</font></a></li>
													</ul>
													<!--[if lte IE 6]><script type="text/javascript">$('#themeSwitch').hide();</script><![endif]-->
												</div>
											</fieldset>
										</form>
										<!--
										<div class="social-or-login center">
											<span class="bigger-110">Or Login Using</span>
										</div>

										<div class="space-6"></div>

										<div class="social-login center">
											<a class="btn btn-primary">
												<i class="ace-icon fa fa-facebook"></i>
											</a>

											<a class="btn btn-info">
												<i class="ace-icon fa fa-twitter"></i>
											</a>

											<a class="btn btn-danger">
												<i class="ace-icon fa fa-google-plus"></i>
											</a>
										</div>
										-->



										<div class="form-options option1 clearfix">
											<div style="width: 20px;height: auto" class="pull-left">
												 
											</div>
											<div>
												<a href="javascript:void(0)" data-target="#forgot-box" class="pull-left">
													<font color="#428bca">
														忘记密码</font>
												</a>
											</div>
											<div style="width: 150px;height: auto" class="pull-left">
												 
											</div>
											<div>
												<a href="${ctx}/login#" data-target="#randomCodeLogin-box" class="pull-left">
													<font color="#428bca">
														快速登录</font>
												</a>
											</div>










										</div>
									</div><!-- /.widget-main -->
								</div><!-- /.widget-body -->
							</div><!-- /.login-box -->

							<div id="randomCodeLogin-box" class="login-box widget-box">
								<div class="login-title">
									<span>快速登录</span>
								</div>
								<div class="widget-body bound">
									<div class="widget-main bound">

										<form id="randomCodeLoginForm" class="form-signin" action="${ctx}/login" method="post" novalidate="novalidate">
											<fieldset>
												<div style="height:50px"></div>
												<label class="block clearfix common">
															<span class="block input-icon input-icon-right">
																<input type="hidden" name="isCodeLogin" value="yes">
																<input id="tel_getRandomCode" name="username" type="text" value="" maxlength="11" minlength="11" class="form-control text-muted required isMobile" placeholder="手机号" aria-required="true">
																<i class="ace-icon fa fa-phone"></i>
															</span>
												</label>
												<label class="block clearfix common" style="width:150px;float: left;">
															<span class="block input-icon input-icon-right">
																<input id="randomCode4Login" name="randomCode" type="text" style="width:150px;" value="" maxlength="4" minlength="4" class="form-control required" placeholder="验证码" aria-required="true">
																<label id="random-code-error" class="error" for="code" style="display:none;"></label>
															</span>
												</label>
												<label class="block clearfix common">
													<span class="block input-icon input-icon-right">
														<button style="width:120px !important;" class="width-35 pull-right btn btn-sm btn-primary" type="button" id="sendRandomCodeBtn">
																	<i class="ace-icon fa fa-lightbulb-o"></i>
																	<span class="bigger-110">获取验证码!</span>
																</button>
													</span>
												</label>

												<button id="randomCodeloginButton" type="submit" class="width-100 btn btn-sm btn-primary" style="margin-top:13px;">
													<i class="ace-icon fa fa-key"></i>
													<span class="bigger-110">登录</span>
												</button>
											</fieldset>
										</form>
										<div class="form-options center option1" style="margin-top:13px;">


											<a href="${ctx}/login#" data-target="#login-box" class="">
												<font color="#428bca"><i class="ace-icon fa fa-arrow-left"></i>
													返回登录
												</font>
											</a>
										</div>
									</div>
								</div><!-- /.widget-body -->
							</div>

							<div id="forgot-box" class="forgot-box widget-box">
								<div class="login-title">
									<span>重置密码</span>
								</div>
								<div class="widget-body bound">
									<div class="widget-main bound" style="height: 300px;">
										<form id="resetForm" class="form-group form-horizontal" action="${ctx}/sys/user/resetPassword" method="post" novalidate="novalidate">
											<fieldset>
												<div style="height:10px"></div>
												<label class="block clearfix" style="height: 53px;">
															<span class="block input-icon input-icon-right">
																<input id="tel_resetpass" name="mobile" type="text" value="" maxlength="11" minlength="11" class="form-control text-muted required isMobile" placeholder="手机号" aria-required="true">
																<i class="ace-icon fa fa-phone"></i>
															</span>
												</label>
												<label class="block clearfix" style="height: 53px;">
															<span class="block input-icon input-icon-right">
																<input id="rcode" name="randomCode" type="text" style="width:150px;" value="" maxlength="4" minlength="4" class="form-control required" placeholder="验证码" aria-required="true">
																<button id="sendPassBtn" type="button" style="width:120px !important;" class="width-35 pull-right btn btn-sm btn-primary">
																<i class="ace-icon fa fa-lightbulb-o"></i>
																<span class="bigger-110">获取验证码!</span>
															</button>
																<label id="rcode-error" class="error" for="rcode" style="display:none"></label>
															</span>
												</label>
												<label class="block clearfix" style="height: 53px;">
															<span class="block input-icon input-icon-right">
																<input id="rnewPassword" name="password" type="password" value="" maxlength="12" class="form-control required" placeholder="新密码" aria-required="true">
																<i class="ace-icon fa fa-lock"></i>
															</span>
												</label>
												<label class="block clearfix" style="height: 53px;">
															<span class="block input-icon input-icon-right">
																<input id="rconfirmNewPassword" name="confirmNewPassword" type="password" value="" maxlength="12" class="form-control required" equalto="#rnewPassword" placeholder="重复密码" aria-required="true">
																<i class="ace-icon fa fa-retweet"></i>
															</span>
												</label>
												<div class="clearfix" style="height: 53px;">
													<button type="reset" class="width-30 pull-left btn btn-sm">
														<i class="ace-icon fa fa-refresh"></i>
														<span class="bigger-110">重置</span>
													</button>
													<button type="submit" class="width-65 pull-right btn btn-sm btn-primary">
														<span class="bigger-110">保存</span>
														<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
													</button>
												</div>
											</fieldset>
										</form>
										<div class="form-options center">


											<a href="javascript:void(0)" data-target="#login-box" class="">
												<font color="#428bca"><i class="ace-icon fa fa-arrow-left"></i>
													返回登录
												</font>
											</a>
										</div>
									</div>
								</div><!-- /.widget-body -->
							</div>

							<div id="signup-box" class="signup-box widget-box">
								<div class="login-title">
									<span>用户注册</span>
								</div>
								<div class="widget-body bound">
									<div class="widget-main bound" style="height:300px;">
										<form id="inputForm" class="form-group form-horizontal" action="${ctx}/sys/register/registerUser" method="post" novalidate="novalidate">
											<input type="hidden" value="system" name="roleName"><!-- 默认注册用户都是新员工 -->
											<fieldset>
												<div style="height:10px"></div>
												<label class="block clearfix" style="height: 38px;">
															<span class="block input-icon input-icon-right">
																<input id="tel" name="mobile" type="text" value="" maxlength="11" minlength="11" class="form-control text-muted required isMobile" placeholder="手机号" aria-required="true">
																<i class="ace-icon fa fa-phone"></i>
															</span>
												</label>
												<label class="block clearfix" style="height: 38px;">
															<span class="block input-icon input-icon-right">
																<input id="code" name="randomCode" type="text" value="" style="width:170px;" maxlength="4" minlength="4" class="form-control required" placeholder="验证码" aria-required="true">
																<button style="width:120px !important;" class="width-35 pull-right btn btn-sm btn-primary" type="button" id="sendCodeBtn">
																	<i class="ace-icon fa fa-lightbulb-o"></i>
																	<span class="bigger-110">获取验证码!</span>
																</button>
																<label id="code-error" class="error" for="code" style="display:none"></label>
															</span>
												</label>
												<label class="block clearfix" style="height: 38px;">
															<span class="block input-icon input-icon-right">
																<input id="userId" name="name" type="text" value="" maxlength="20" minlength="2" class="form-control required" placeholder="姓名" aria-required="true">
																<i class="ace-icon fa fa-user"></i>
															</span>
												</label>

												<label class="block clearfix" style="height: 38px;">
															<span class="block input-icon input-icon-right">
																<input id="newPassword" name="password" type="password" value="" maxlength="12" minlength="6" class="form-control text-muted required isPassword" placeholder="密码" aria-required="true">
																<i class="ace-icon fa fa-lock"></i>
															</span>
												</label>

												<label class="block clearfix" style="height: 38px;">
															<span class="block input-icon input-icon-right">
																<input id="confirmNewPassword" name="confirmNewPassword" type="password" value="" maxlength="20" minlength="3" class="form-control required" equalto="#newPassword" placeholder="重复密码" aria-required="true">
																<i class="ace-icon fa fa-retweet"></i>
															</span>
												</label>

												<label class="block" style="height:40px;position: relative;">
													<input name="ck1" type="checkbox" class="required ace" aria-required="true">
													<span class="lbl">
																我接受
																<a href="${ctxStatic}/html/agreement.html" target="_blank">《匞匞用户注册协议》</a>
															</span>
													<label id="ck1-error" class="error" for="ck1" style="display: none;position:absolute;left:170px;top:15px;">必须接受用户协议</label>
												</label>

												<div class="clearfix" style="height: 40px;">
													<button type="reset" class="width-30 pull-left btn btn-sm">
														<i class="ace-icon fa fa-refresh"></i>
														<span class="bigger-110">重置</span>
													</button>

													<button type="submit" class="width-65 pull-right btn btn-sm btn-primary">
														<span class="bigger-110">注册</span>

														<i class="ace-icon fa fa-arrow-right icon-on-right"></i>
													</button>
												</div>
											</fieldset>
										</form>
										<div class="form-options center">


											<a href="javascript:void(0)" data-target="#login-box" class="" style="height: 30px;">
												<font color="#428bca"><i class="ace-icon fa fa-arrow-left"></i>
													返回登录
												</font>
											</a>
										</div>
									</div>


								</div><!-- /.widget-body -->
							</div><!-- /.signup-box -->


						</div>
					</div><!-- /.position-relative -->

				</div>
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.main-content -->
</div><!-- /.main-container -->

<!-- basic scripts -->

<!--[if !IE]> -->
<script type="text/javascript">
    window.jQuery || document.write("<script src='../assets/js/jquery.js'>"+"<"+"/script>");
</script>

<!-- <![endif]-->

<!--[if IE]>
<script type="text/javascript">
	window.jQuery || document.write("<script src='../assets/js/jquery1x.js'>"+"<"+"/script>");
</script>
<![endif]-->

<script type="text/javascript">
    if('ontouchstart' in document.documentElement) document.write("<script src='../assets/js/jquery.mobile.custom.js'>"+"<"+"/script>");
</script>
<style>
	/* Validation */

	label.error {
		color: #cc5965;
		display: inline-block;
		margin-left: 5px;
		position: absolute;
		left: 58px;
		top: 7px;
		white-space: nowrap;
	}

	.form-control.error {
		border: 1px dotted #cc5965;
	}

</style>
<!-- inline scripts related to this page -->
<script type="text/javascript">
    $(document).ready(function() {
        $(document).on('click', '.form-options a[data-target]', function(e) {
            e.preventDefault();
            var target = $(this).data('target');
            $('.widget-box.visible').removeClass('visible');//hide others
            $(target).addClass('visible');//show target
        });

    });
	$("#span").bind('DOMNodeInserted',function(e){
		var msg = $("#span").html();
		var end = msg.indexOf('存');
		if(end != -1){
			var name = msg.substring(0,end);
			layer.open({
				type: 2,
				area: ['40%', '40%'],
				title: '选择用户',
				maxmin: true, //开启最大化最小化按钮
				content: '${ctx}/workstaff/workStaffBasicInfo/repeatName?name='+encodeURI(encodeURI(name)),
				// btn: ['关闭'],
			});
		}


	});


	<c:if test="${not empty message}">
        $("#span").empty();
	    $("#span").html("${message}");
	</c:if>
</script>
<link rel="stylesheet" href="${ctxStatic }/layer-v2.3/layui/css/layui.css" />
<script src="${ctxStatic}/layer-v2.3/layui/layui.all.js" charset="utf-8"></script>
<script>
    layui.use(['carousel', 'form'], function() {
            var carousel = layui.carousel;
			carousel.render({
				elem: '#banners'
				// ,interval: 5000
				,anim: 'fade'
				,height:'300px'
			});
        })
</script>
<script src="${ctxStatic}/ckline/jquery.ckLine.min.js"></script>
<script type="text/javascript">
    // function hasYScrollbar() {
    //     return document.body.scrollHeight > (window.innerHeight || document.documentElement.clientHeight);
    // }
    // function getScrollWidth() {
    //     var noScroll, scroll, oDiv = document.createElement("DIV");
    //     oDiv.style.cssText = "position:absolute;top:-1000px;width:100px;height:100px; overflow:hidden;";
    //     noScroll = document.body.appendChild(oDiv).clientWidth;
    //     oDiv.style.overflowY = "scroll";
    //     scroll = oDiv.clientWidth;
    //     document.body.removeChild(oDiv);
    //     return noScroll-scroll;
    // }
    // function resizeSVGBackground()
    // {
	 //    if(hasYScrollbar)
		// {
		//     var w = getScrollWidth();
    //         var wa= window.innerWidth
    //             || document.documentElement.clientWidth
    //             || document.body.clientWidth;
    //         $("#ckLine").attr("height",(wa - w) + "px");
		// }
		// else
		// {
    //         $("#ckLine").attr("height","100%");
		// }
    // }
    // resizeSVGBackground();

    $('#ckLine').ckLine({
        leftRight: false,
        strokeColor: 'rgba(255,255,255,0.4)',
        interval: 800,
        animateTime: 1600,
        animationTimeRange: [800, 1600]
    });
</script>
</body>
</html>
