3371dbc6
孙向锦
0720 版本
|
1
2
3
4
5
6
7
8
9
10
11
|
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE html>
|
a9f5da51
孙向锦
更换首页
|
12
|
<html lang="zh-CN">
|
eef2f078
孙向锦
修改域名问题
|
13
14
15
16
|
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
|
32d27bdc
jack
1.增加判断题和数字题,调试更改上传数据
|
17
|
<title>教育管理系统</title>
|
ad5081d3
孙向锦
初始化项目
|
18
|
|
eef2f078
孙向锦
修改域名问题
|
19
|
<!-- Bootstrap -->
|
21804155
jack
1、修改jq和bootstrap路径
|
20
|
<link href="static/css/bootstrap.min.css" rel="stylesheet">
|
eef2f078
孙向锦
修改域名问题
|
21
|
<link href="static/login/style_login.css" rel="stylesheet">
|
377085db
jack
1、优化登录界面历史记录交互
|
22
|
<link href="static/css/mb_style.css" rel="stylesheet">
|
eef2f078
孙向锦
修改域名问题
|
23
|
|
54a5b6ad
jack
1.英文翻译
|
24
25
|
<script src="static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="static/js/jquery.cookie.js"></script>
|
eef2f078
孙向锦
修改域名问题
|
26
27
28
|
<script src="static/login/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="static/js/jQuery.md5.js"></script>
<script type="text/javascript" src="static/js/jquery.tips.js"></script>
|
fd0087a8
孙向锦
添加英语语言
|
29
|
<script type="text/javascript" src="static/js/lang.js"></script>
|
377085db
jack
1、优化登录界面历史记录交互
|
30
|
<script type="text/javascript" src="static/js/remove.js"></script>
|
fd0087a8
孙向锦
添加英语语言
|
31
32
33
34
35
|
<script type="text/javascript" >
if(lang() != 'zh'){
}
</script>
|
eef2f078
孙向锦
修改域名问题
|
36
|
<style type="text/css">
|
21804155
jack
1、修改jq和bootstrap路径
|
37
38
39
|
body{
margin:0;
}
|
eef2f078
孙向锦
修改域名问题
|
40
41
42
43
44
45
46
47
48
49
50
|
.div_foot {
height: 30px;
line-height: 35px;
position: fixed;
bottom: 0;
width: 100%;
text-align: center;
font-family: Arial;
font-size: 14px;
letter-spacing: 1px;
}
|
377085db
jack
1、优化登录界面历史记录交互
|
51
52
53
54
55
56
57
58
59
|
.clear_history{
text-align:right;
line-height:30px;
margin: 0;
}
.clear_history a{
text-decoration: underline;
margin-right: 15px;
}
|
eef2f078
孙向锦
修改域名问题
|
60
|
</style>
|
ad5081d3
孙向锦
初始化项目
|
61
|
|
eef2f078
孙向锦
修改域名问题
|
62
63
64
|
<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
<!--[if lt IE 9]>
|
a9f5da51
孙向锦
更换首页
|
65
66
67
|
<script src="https://cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
|
eef2f078
孙向锦
修改域名问题
|
68
69
70
|
</head>
<body>
<div class="content">
|
a9f5da51
孙向锦
更换首页
|
71
|
<div class="content_t">
|
32d27bdc
jack
1.增加判断题和数字题,调试更改上传数据
|
72
|
<img src="static/login/title1.png" alt="SunVote" />
|
ad5081d3
孙向锦
初始化项目
|
73
|
</div>
|
a9f5da51
孙向锦
更换首页
|
74
|
<div class="content_b">
|
eef2f078
孙向锦
修改域名问题
|
75
|
<div class="form_box">
|
21804155
jack
1、修改jq和bootstrap路径
|
76
|
<div id="loginbox" >
|
f6fc6e4e
孙向锦
首页登录代码还原
|
77
|
<div class="name_box">
|
89ac0783
jack
1.添加年级卷分析功能
|
78
|
<input type="text" id="username1" placeholder="账号" value="" style="opacity:0;position: absolute;top:0;height:0px;z-index:-1" autoComplete="off"/>
|
8e84e625
jack
1.修复报表页面查询按钮
|
79
|
<input type="password" id="password1" placeholder="密 码" value="" style="opacity:0;position: absolute;top:0;height:0px;z-index:-1" autoComplete="off"/>
|
54a5b6ad
jack
1.英文翻译
|
80
|
<input type="text" id="loginname" value="" placeholder="用户名" autoComplete="off"/>
|
f6fc6e4e
孙向锦
首页登录代码还原
|
81
82
83
|
<svg t="1554790328236" class="icon_down" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2161" xmlns:xlink="http://www.w3.org/1999/xlink" width="32" height="32"><defs><style type="text/css"></style></defs><path d="M863.321996 251.674996 194.108395 251.674996 528.677333 621.186771Z" p-id="2162" fill="#333333"></path></svg>
</div>
<div class="psw_box">
|
54a5b6ad
jack
1.英文翻译
|
84
85
|
<input type="text" id="password" placeholder="密 码" value="" autoComplete="off"/>
<div class="rember" style="width:50%;float:left;text-align:left;margin-top:10px;display:inline-block;line-height:34px;">
|
f6fc6e4e
孙向锦
首页登录代码还原
|
86
87
88
|
<input type="checkbox" id="rem_flag"/>
<span>记住密码</span>
</div>
|
58e024ae
jack
1.修改logo
|
89
|
<div class="language" style="display:inline-block;width:50%;margin-top:10px;text-align:right;">
|
54a5b6ad
jack
1.英文翻译
|
90
91
92
93
|
<select name="language" id="language" style="line-height:34px;height:34px;width:120px;">
<option value="zh">中文</option>
<option value="en">English</option>
</select>
|
58e024ae
jack
1.修改logo
|
94
|
</div>
|
f6fc6e4e
孙向锦
首页登录代码还原
|
95
96
97
98
99
100
101
|
</div>
<a href="#" onclick="severCheck();" class="login_btn">登录</a>
<div class="history">
<ul>
</ul>
|
377085db
jack
1、优化登录界面历史记录交互
|
102
|
<p class="clear_history"><a onclick="clear_history()">清除记录</a></p>
|
f6fc6e4e
孙向锦
首页登录代码还原
|
103
|
</div>
|
21804155
jack
1、修改jq和bootstrap路径
|
104
|
</div>
|
ad5081d3
孙向锦
初始化项目
|
105
|
|
eef2f078
孙向锦
修改域名问题
|
106
107
108
|
</div>
</div>
<div class="div_foot">
|
d7525cae
jack
1.学生老师导入导出
|
109
|
<!-- 备案许可证号: <a target= "_blank" href="http://www.miitbeian.gov.cn/">湘ICP备09025927号-10</a> -->
|
eef2f078
孙向锦
修改域名问题
|
110
111
|
</div>
<script type="text/javascript">
|
a9f5da51
孙向锦
更换首页
|
112
|
|
3371dbc6
孙向锦
0720 版本
|
113
114
115
|
if(window.top != window.self){
window.top.location.href = "<%=basePath%>";
}
|
d318653d
=
1、登录页添加回车交互
|
116
117
118
119
120
121
122
123
124
|
document.onkeydown = function (e) { // 回车提交表单
// 兼容FF和IE和Opera
var theEvent = window.event || e;
var code = theEvent.keyCode || theEvent.which || theEvent.charCode;
if (code == 13) {
severCheck();
}
}
|
f6fc6e4e
孙向锦
首页登录代码还原
|
125
126
127
128
129
|
$(".icon_down").click(function(){
$("#loginname").focus();
});
|
8e84e625
jack
1.修复报表页面查询按钮
|
130
131
132
133
134
135
136
137
138
139
|
$("#password").blur(function(){
if($("#password").val()!=""){
$("#password").attr("type","password");
}else{
$("#password").attr("type","text");
}
});
$("#password").focus(function(){
$("#password").attr("type","password");
});
|
377085db
jack
1、优化登录界面历史记录交互
|
140
|
$("#loginname").focus(function(e){
|
f6fc6e4e
孙向锦
首页登录代码还原
|
141
142
|
var _html="";
var u_list=JSON.parse(storage.getItem('userNameList'));
|
377085db
jack
1、优化登录界面历史记录交互
|
143
144
145
146
147
148
149
150
151
152
|
console.log(u_list);
if((u_list!=null)||(u_list.length>0)){
$("#loginname").blur(function(){
$(".history").hide();
})
for(var i=0;i<u_list.length;i++){
_html+='<li>'+u_list[i]+'</li>';
}
$(".history ul").html(_html);
$(".history").show();
|
f6fc6e4e
孙向锦
首页登录代码还原
|
153
|
}
|
377085db
jack
1、优化登录界面历史记录交互
|
154
|
|
f6fc6e4e
孙向锦
首页登录代码还原
|
155
156
|
});
|
64c85212
jack
1、修改bug
|
157
|
$('.history').hover(function(){ //鼠标悬停下拉框时,解绑blur事件
|
377085db
jack
1、优化登录界面历史记录交互
|
158
159
|
$("#loginname").unbind("blur");
},function(){
|
64c85212
jack
1、修改bug
|
160
|
$("#loginname").blur(function(){ //鼠标移出下拉框时,添加blur事件
|
377085db
jack
1、优化登录界面历史记录交互
|
161
162
163
|
$(".history").hide();
})
});
|
f6fc6e4e
孙向锦
首页登录代码还原
|
164
|
|
377085db
jack
1、优化登录界面历史记录交互
|
165
|
$(document).on('click','.history li',function(){
|
f6fc6e4e
孙向锦
首页登录代码还原
|
166
|
var p_list=JSON.parse(storage.getItem('passWordList'));
|
8e84e625
jack
1.修复报表页面查询按钮
|
167
|
$("#password").attr("type","password")
|
f6fc6e4e
孙向锦
首页登录代码还原
|
168
169
|
$("#loginname").val($(this).text());
$("#password").val(p_list[$(this).index()]);
|
f6fc6e4e
孙向锦
首页登录代码还原
|
170
171
|
$(".history").hide();
})
|
377085db
jack
1、优化登录界面历史记录交互
|
172
|
|
54a5b6ad
jack
1.英文翻译
|
173
174
175
176
177
178
|
//更换语言
$("#language").change(function(){
$.cookie("lang",$("#language").val());
window.location.reload();
})
console.log($.cookie("lang"));
|
f6fc6e4e
孙向锦
首页登录代码还原
|
179
180
|
|
a9f5da51
孙向锦
更换首页
|
181
182
183
184
185
186
187
|
//客户端校验
function check() {
if ($("#loginname").val() == "") {
$("#loginname").tips({
side : 2,
msg : '用户名不得为空',
|
2ce09a20
jack
1.修改bug
|
188
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
189
190
191
192
193
194
195
196
197
198
199
200
|
time : 3
});
showfh();
$("#loginname").focus();
return false;
} else {
$("#loginname").val(jQuery.trim($('#loginname').val()));
}
if ($("#password").val() == "") {
$("#password").tips({
side : 2,
msg : '密码不得为空',
|
2ce09a20
jack
1.修改bug
|
201
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
202
203
204
205
206
207
208
|
time : 3
});
showfh();
$("#password").focus();
return false;
}
|
2ce09a20
jack
1.修改bug
|
209
|
|
a9f5da51
孙向锦
更换首页
|
210
211
212
|
return true;
}
|
377085db
jack
1、优化登录界面历史记录交互
|
213
214
|
|
a9f5da51
孙向锦
更换首页
|
215
|
|
ad5081d3
孙向锦
初始化项目
|
216
217
218
219
220
|
//服务器校验
function severCheck(){
if(check()){
var loginname = $("#loginname").val();
var password = $("#password").val();
|
81df8ce6
孙向锦
去掉多余的信息
|
221
|
var code = loginname+";;;"+password+";;;" + $("#code").val();
|
ad5081d3
孙向锦
初始化项目
|
222
223
224
225
226
227
228
229
|
$.ajax({
type: "POST",
url: 'login_login',
data: {KEYDATA:code,tm:new Date().getTime()},
dataType:'json',
cache: false,
success: function(data){
if("success" == data.result){
|
f6fc6e4e
孙向锦
首页登录代码还原
|
230
231
|
if($("#rem_flag").prop("checked")) //如果选择了记住密码
saveCookie();
|
338594c8
孙向锦
添加教师端页面
|
232
233
|
if(data.teacher != null){
window.location.href="main/teacher";
|
6b3a5ad0
孙向锦
添加管理员界面
|
234
235
|
}else if(data.admin != null){
window.location.href="main/admin";
|
338594c8
孙向锦
添加教师端页面
|
236
237
238
|
}else{
window.location.href="main/index";
}
|
ad5081d3
孙向锦
初始化项目
|
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
}else if("usererror" == data.result){
$("#loginname").tips({
side : 1,
msg : "用户名或密码有误",
bg : '#FF5080',
time : 15
});
showfh();
$("#loginname").focus();
}else if("codeerror" == data.result){
$("#code").tips({
side : 1,
msg : "验证码输入有误",
bg : '#FF5080',
time : 15
});
showfh();
$("#code").focus();
}else{
$("#loginname").tips({
side : 1,
msg : "缺少参数",
bg : '#FF5080',
time : 15
});
showfh();
$("#loginname").focus();
}
}
});
}
}
|
a9f5da51
孙向锦
更换首页
|
271
|
|
f6fc6e4e
孙向锦
首页登录代码还原
|
272
273
274
275
276
277
|
var storage=window.localStorage;
var userNameList=[];
var passWordList=[];
//console.log(JSON.parse(storage.getItem('userNameList')));
|
377085db
jack
1、优化登录界面历史记录交互
|
278
279
280
281
282
283
284
285
286
287
288
|
//清除历史记录
function clear_history(){
window.top.remove.init({"title":"确定清除历史记录吗?","func":function(success){
if(success){
storage.clear();
$(".history").hide();
}else{
console.log("false");
}
}});
window.top.remove.show();
|
64c85212
jack
1、修改bug
|
289
|
$(".mb_head .close img").css("display","none");
|
377085db
jack
1、优化登录界面历史记录交互
|
290
291
|
}
//保存登录记录
|
ad5081d3
孙向锦
初始化项目
|
292
|
function saveCookie() {
|
f6fc6e4e
孙向锦
首页登录代码还原
|
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
|
if(!window.localStorage){
alert("浏览器不支持localstorage");
}else{
//主逻辑业务
userNameList=JSON.parse(storage.getItem('userNameList'));
passWordList=JSON.parse(storage.getItem('passWordList'));
if(userNameList==null){
var userNameList=[];
var passWordList=[];
userNameList.push($("#loginname").val());
passWordList.push($("#password").val());
storage.setItem('userNameList',JSON.stringify(userNameList));
storage.setItem('passWordList',JSON.stringify(passWordList));
}else{
if(userNameList.indexOf($("#loginname").val())>-1){
return false;
}else{
userNameList.push($("#loginname").val());
passWordList.push($("#password").val());
storage.setItem('userNameList',JSON.stringify(userNameList));
storage.setItem('passWordList',JSON.stringify(passWordList));
}
}
//console.log(userNameList);
}
/*$.cookie('loginname', $("#loginname").val(), {
|
ad5081d3
孙向锦
初始化项目
|
332
333
334
335
|
expires : 7
});
$.cookie('password', $("#password").val(), {
expires : 7
|
f6fc6e4e
孙向锦
首页登录代码还原
|
336
337
|
});*/
|
ad5081d3
孙向锦
初始化项目
|
338
|
}
|
ad5081d3
孙向锦
初始化项目
|
339
|
</script>
|
21804155
jack
1、修改jq和bootstrap路径
|
340
341
|
|
eef2f078
孙向锦
修改域名问题
|
342
343
|
<!-- 软键盘控件start -->
|
21804155
jack
1、修改jq和bootstrap路径
|
344
345
|
<script type="text/javascript" src="static/login/keypad/js/form/keypad.js"></script>
<script type="text/javascript" src="static/login/keypad/js/framework.js"></script>
|
eef2f078
孙向锦
修改域名问题
|
346
|
</body>
|
ad5081d3
孙向锦
初始化项目
|
347
|
</html>
|