|
1
|
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
|
|
2
|
<!DOCTYPE html>
|
|
3
|
<%@ include file="/WEB-INF/views/common/tags/taglib.jsp"%>
|
|
4
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
5
|
<head>
|
|
6
|
<title>登录</title>
|
|
7
|
<%@ include file="/WEB-INF/views/common/header.jsp"%>
|
|
8
|
|
|
9
|
<link href="${uiPath}/libs/hplus/css/login.css" rel="stylesheet">
|
|
10
|
<c:set var="config" value="${fns:findSysConfig()}"/>
|
|
11
|
<%
|
|
12
|
request.getSession().invalidate();
|
|
13
|
if (request.getCookies() != null) {
|
|
14
|
Cookie cookie = request.getCookies()[0];
|
|
15
|
cookie.setMaxAge(0);
|
|
16
|
}
|
|
17
|
%>
|
|
18
|
<style type="text/css">
|
|
19
|
.layui-layer-btn{
|
|
20
|
background:#ffffff;
|
|
21
|
}
|
|
22
|
</style>
|
|
23
|
</head>
|
|
24
|
|
|
25
|
<body class="signin">
|
|
26
|
<div class="signinpanel">
|
|
27
|
<div class="row">
|
|
28
|
<div class="col-sm-7">
|
|
29
|
<div class="signin-info">
|
|
30
|
<div class="logopanel m-b">
|
|
31
|
<h1>
|
|
32
|
<i>
|
|
33
|
<img src="${pageContext.request.contextPath}/api/config/getSysLogoImage.do?code=${config.applicationCode}"
|
|
34
|
width="30" height="30" style="vertical-align: top;"/>
|
|
35
|
</i>
|
|
36
|
<span class="white" id="id-text2">${config.sysName}</span>
|
|
37
|
</h1>
|
|
38
|
</div>
|
|
39
|
|
|
40
|
</div>
|
|
41
|
</div>
|
|
42
|
<div class="col-sm-5">
|
|
43
|
<form id="loginForm" action="${ctx}/login" class="login_form" method="post">
|
|
44
|
<h4 class="no-margins">登录:</h4>
|
|
45
|
<input type="hidden" name="username" id="username"/>
|
|
46
|
<input type="hidden" name="loginPwd" id="loginPwd"/>
|
|
47
|
<input type="text" name="username1" id="username1" class="form-control uname" placeholder="用户名" />
|
|
48
|
<input type="password" name="loginPwd1" id="loginPwd1" autocomplete="off" class="form-control pword m-b" placeholder="密码" />
|
|
49
|
|
|
50
|
<c:if test="${fns:getConfig('login.validate') eq 'true'}">
|
|
51
|
<!-- 是否需要登陆验证码 -->
|
|
52
|
<input type="text" name="validateCode" id="validateCode" class="form-control" placeholder="验证码" style="color: #000000" autocomplete="off" />
|
|
53
|
<img src="${ctx}/randomCode?randomNum=1" id="imageSrc" alt="看不清楚,换一张" style="margin:10px 5px 10px 0px ">
|
|
54
|
<a href="javascript:void(0)" onclick="reloadCode()">看不清楚,换一张</a>
|
|
55
|
</c:if>
|
|
56
|
|
|
57
|
<div class="col-sm-3" style="padding:0px 0px 5px 0px">
|
|
58
|
<div class="switch">
|
|
59
|
<div class="onoffswitch">
|
|
60
|
<input type="checkbox" name="rememberMe" class="onoffswitch-checkbox" id="rememberMe">
|
|
61
|
<label class="onoffswitch-label" for="rememberMe">
|
|
62
|
<span class="onoffswitch-inner"></span>
|
|
63
|
<span class="onoffswitch-switch"></span>
|
|
64
|
</label>
|
|
65
|
</div>
|
|
66
|
</div>
|
|
67
|
</div>
|
|
68
|
<div class="col-sm-4">记住我</div>
|
|
69
|
<button id="login" class="btn btn-success btn-block">登录</button>
|
|
70
|
<div style="padding:10px 0px 0px 0px"><a href="javascript:void(0)" onclick="toFindPwd()">忘记密码</a></div>
|
|
71
|
</form>
|
|
72
|
</div>
|
|
73
|
</div>
|
|
74
|
<div class="signup-footer">
|
|
75
|
<div class="pull-left">
|
|
76
|
©2017 <a href="${config.url}" target="_blank">${config.copyright}</a>
|
|
77
|
</div>
|
|
78
|
</div>
|
|
79
|
</div>
|
|
80
|
</body>
|
|
81
|
|
|
82
|
<%@ include file="/WEB-INF/views/common/footer.jsp"%>
|
|
83
|
<script src="${uiPath}/libs/jquery.cookie-1.4.1.js" type="text/javascript"></script>
|
|
84
|
<script type="text/javascript" src="${ctxStatic}/common/base64.js?v=${_version}"></script>
|
|
85
|
<script type="text/javascript">
|
|
86
|
|
|
87
|
|
|
88
|
jQuery(function($) {
|
|
89
|
var message = '${message}';
|
|
90
|
if (window.top !== window.self) {
|
|
91
|
window.top.location = window.location;
|
|
92
|
}
|
|
93
|
try{
|
|
94
|
var _href = window.location.href+"";
|
|
95
|
if(_href && _href.indexOf('?kickout')!=-1){
|
|
96
|
layer.msg('您已经被踢出,请联系管理员或者重新登录!',function(){});
|
|
97
|
}
|
|
98
|
}catch(e){
|
|
99
|
|
|
100
|
}
|
|
101
|
if (message != '') {
|
|
102
|
layer.msg(message,function(){});
|
|
103
|
}
|
|
104
|
//记住我
|
|
105
|
if($.cookie('username') && $.cookie('username') != 'null'){
|
|
106
|
$("#username1").val($.cookie('username'));
|
|
107
|
$("#rememberMe").attr("checked",true);
|
|
108
|
}
|
|
109
|
|
|
110
|
//回车事件绑定
|
|
111
|
document.onkeydown=function(event){
|
|
112
|
var e = event || window.event || arguments.callee.caller.arguments[0];
|
|
113
|
if(e && e.keyCode==13){
|
|
114
|
$('#login').click();
|
|
115
|
}
|
|
116
|
};
|
|
117
|
|
|
118
|
//登录操作
|
|
119
|
$('#login').click(function(){
|
|
120
|
var username = $.trim($("#username1").val());
|
|
121
|
var password = $("#loginPwd1").val();
|
|
122
|
if (username == "") {
|
|
123
|
layer.msg('请输入用户名',function(){});
|
|
124
|
$('#username1').focus();
|
|
125
|
return false;
|
|
126
|
}
|
|
127
|
if (password == "") {
|
|
128
|
layer.msg('请输入密码',function(){});
|
|
129
|
$('#loginPwd1').focus();
|
|
130
|
return false;
|
|
131
|
}
|
|
132
|
loginCookie();
|
|
133
|
//账号,密码加密
|
|
134
|
$("#username").val(encode64(username));
|
|
135
|
$("#loginPwd").val(encode64(password));
|
|
136
|
$("#username1").attr("disabled", true);
|
|
137
|
$("#loginPwd1").attr("disabled", true);
|
|
138
|
//$("#loginForm").submit();
|
|
139
|
});
|
|
140
|
});
|
|
141
|
|
|
142
|
function loginCookie(){
|
|
143
|
if($("#rememberMe").is(":checked")){
|
|
144
|
$.cookie('username', $.trim($("#username1").val()), { expires: 7 , path: '/' });
|
|
145
|
}else{
|
|
146
|
$.cookie('username', null,{ path: '/' });
|
|
147
|
}
|
|
148
|
}
|
|
149
|
|
|
150
|
/**
|
|
151
|
* 获取验证码
|
|
152
|
*/
|
|
153
|
function reloadCode(){
|
|
154
|
var node = document.getElementById("imageSrc");
|
|
155
|
node.src = "randomCode?randomNum="+Math.random(5);
|
|
156
|
}
|
|
157
|
|
|
158
|
//跳转找回密码界面
|
|
159
|
function toFindPwd(){
|
|
160
|
var diag = promptWin();
|
|
161
|
diag.Width = 770;
|
|
162
|
diag.Height = 400;
|
|
163
|
diag.maxmin = false;
|
|
164
|
diag.URL = projectPath+"/bdm/user/anon/toFindPwd";
|
|
165
|
diag.OkButtonText = "提交";
|
|
166
|
diag.CancelButtonText = "关闭";
|
|
167
|
diag.OKEvent = function() {
|
|
168
|
diag.innerFrame.contentWindow.save();
|
|
169
|
}
|
|
170
|
diag.CancelEvent = function() {
|
|
171
|
diag.close();
|
|
172
|
};
|
|
173
|
diag.show();
|
|
174
|
}
|
|
175
|
</script>
|
|
176
|
</html>
|