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">
|
876f9385
孙向锦
李聪定制
|
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">
|
eef2f078
孙向锦
修改域名问题
|
22
|
|
54a5b6ad
jack
1.英文翻译
|
23
24
|
<script src="static/js/jquery-2.1.4.min.js"></script>
<script type="text/javascript" src="static/js/jquery.cookie.js"></script>
|
eef2f078
孙向锦
修改域名问题
|
25
26
27
|
<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
孙向锦
添加英语语言
|
28
|
<script type="text/javascript" src="static/js/lang.js"></script>
|
377085db
jack
1、优化登录界面历史记录交互
|
29
|
<script type="text/javascript" src="static/js/remove.js"></script>
|
7fbab65d
孙向锦
记住密码,清除记录。
|
30
|
<script type="text/javascript">
|
fd0087a8
孙向锦
添加英语语言
|
31
32
33
34
|
if(lang() != 'zh'){
}
</script>
|
eef2f078
孙向锦
修改域名问题
|
35
|
<style type="text/css">
|
7fbab65d
孙向锦
记住密码,清除记录。
|
36
37
38
39
40
|
html,body {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
|
21804155
jack
1、修改jq和bootstrap路径
|
41
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
42
43
44
45
|
img {
width: 100%;
display: inherit;
|
eef2f078
孙向锦
修改域名问题
|
46
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
47
48
49
|
p {
margin: 0;
|
377085db
jack
1、优化登录界面历史记录交互
|
50
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
51
52
53
54
55
56
|
.login {
width: 100%;
min-width: 1200px;
height: 100%;
background: #EFEEF5;
|
876f9385
孙向锦
李聪定制
|
57
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
.login_box {
width: 82.3%;
min-width: 987.6px;
max-width: 1581px;
height: 77.87%;
background: #fff;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
z-index: 9;
box-shadow: 0px 18px 33px 10px rgba(89, 89, 89, 0.2);
|
876f9385
孙向锦
李聪定制
|
73
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
74
75
76
77
78
|
.error {
font-size: 12px;
color: #F25F62;
float: left;
|
876f9385
孙向锦
李聪定制
|
79
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
80
81
82
83
84
85
|
.error img {
width: 12px;
float: left;
margin-top: 3px;
margin-left: 10px;
|
876f9385
孙向锦
李聪定制
|
86
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
87
88
89
|
.error_info {
margin-left: 5px;
|
876f9385
孙向锦
李聪定制
|
90
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
91
92
93
94
|
input:focus-within {
border-style: solid;
border-color: #48A3A5;
|
876f9385
孙向锦
李聪定制
|
95
96
|
box-shadow: 0 0 5px #48A3A5;
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
97
98
99
100
101
102
103
104
105
106
|
.login_box .login_box_left_box {
width: 40%;
float: left;
}
.login_box .login_box_left_box .login_logo {
width: 140px;
margin-top: 80px;
margin-left: 60px;
|
876f9385
孙向锦
李聪定制
|
107
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
108
109
110
|
.login_box .login_box_left_box .login_box_contianer {
margin-top: 60px;
|
876f9385
孙向锦
李聪定制
|
111
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
112
113
114
115
116
117
118
119
120
121
122
|
.login_box .login_box_left_box .login_box_contianer h3 {
text-align: center;
}
.login_box .login_box_left_box .login_box_contianer .form_item {
width: 70%;
margin: 0 auto;
margin-bottom: 20px;
text-align: center;
position: relative;
|
876f9385
孙向锦
李聪定制
|
123
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
124
125
126
127
128
129
130
131
132
133
|
.login_box .login_box_left_box .login_box_contianer .form_item input {
width: 90%;
height: 50px;
line-height: 50px;
padding: 0 10px;
border-radius: 5px;
border: 1px solid #ccc;
outline: none;
background: #ECECEC
|
876f9385
孙向锦
李聪定制
|
134
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
135
136
137
138
139
140
141
142
|
.login_box .login_box_left_box .login_box_contianer .form_item .icon_down
{
position: absolute;
right: 10px;
top: 9px;
width: 20px;
padding: 0 10px;
|
876f9385
孙向锦
李聪定制
|
143
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
144
145
146
147
148
149
150
151
152
153
154
155
156
157
|
.login_box .login_box_left_box .login_box_contianer .history {
width: 90%;
position : absolute;
left:10px;
top: 50px;
padding: 0 10px;
height: auto;
max-height: 240px;
background: #fff;
overflow: auto;
border: 1px solid #ccc;
z-index: 999;
position: absolute;
|
876f9385
孙向锦
李聪定制
|
158
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
159
160
161
162
163
164
165
166
167
168
|
.login_btn {
outline-style: none;
border: none;
color: #fff;
width: 90%;
height: 50px;
line-height: 50px;
border-radius: 8px;
background: #48A3A5;
|
876f9385
孙向锦
李聪定制
|
169
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
170
171
172
173
174
175
176
|
.login_box .login_box_right_box {
height: 100%;
overflow: hidden;
margin-left: 40%;
position: relative;
background: #48A3A6;
|
876f9385
孙向锦
李聪定制
|
177
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
178
179
180
181
182
|
.login_box .login_box_right_box .dec {
position: absolute;
bottom: 100px;
left: 100px;
|
876f9385
孙向锦
李聪定制
|
183
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
184
185
186
187
|
.login_box .login_box_right_box .dec_big {
font-size: 40px;
color: #ECECEC;
|
876f9385
孙向锦
李聪定制
|
188
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
189
190
191
192
|
.login_box .login_box_right_box .dec_mini {
font-size: 24px;
color: #ECECEC;
|
876f9385
孙向锦
李聪定制
|
193
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
194
195
196
197
198
199
|
.login_box .login_box_right_box .right_box_img {
width: 400px;
position: absolute;
right: -23px;
top: -25px;
|
876f9385
孙向锦
李聪定制
|
200
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
201
202
203
204
205
206
207
208
209
|
.right_box_bottom_img {
width: 200px;
height: 200px;
background: #fff;
border-radius: 100px;
position: absolute;
bottom: -100px;
right: -100px;
|
876f9385
孙向锦
李聪定制
|
210
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
211
212
213
214
|
.right_box_bottom_img img {
width: 25%;
margin: 30px 0 0 30px;
|
876f9385
孙向锦
李聪定制
|
215
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
216
217
218
219
220
221
|
.login .left_bottom_img {
position: absolute;
bottom: 0;
left: 0;
width: 19%;
|
876f9385
孙向锦
李聪定制
|
222
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
223
224
225
226
227
228
|
.login .right_bottom_img {
width: 6.25%;
position: absolute;
right: 5%;
bottom: 3%;
|
876f9385
孙向锦
李聪定制
|
229
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
230
231
232
|
.text_right {
text-align: right !important;
|
876f9385
孙向锦
李聪定制
|
233
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
234
235
236
237
|
.text_right input {
display: inline;
vertical-align: middle;
|
876f9385
孙向锦
李聪定制
|
238
|
}
|
7fbab65d
孙向锦
记住密码,清除记录。
|
239
240
241
|
.text_right span {
vertical-align: middle;
|
377085db
jack
1、优化登录界面历史记录交互
|
242
|
}
|
eef2f078
孙向锦
修改域名问题
|
243
|
</style>
|
ad5081d3
孙向锦
初始化项目
|
244
|
|
eef2f078
孙向锦
修改域名问题
|
245
246
247
|
<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
<!--[if lt IE 9]>
|
a9f5da51
孙向锦
更换首页
|
248
249
250
|
<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
孙向锦
修改域名问题
|
251
252
|
</head>
<body>
|
876f9385
孙向锦
李聪定制
|
253
|
<div class="login">
|
7fbab65d
孙向锦
记住密码,清除记录。
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
|
<div class="login_box">
<div class="login_box_left_box">
<div class="login_logo">
<img src="static/login/login_logo.png" alt="">
</div>
<div class="login_box_contianer">
<h3>登录账号</h3>
<div class="form_item">
<input id="loginname" type="text" value="" autoComplete="off"
placeholder="请输入用户名" />
<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 class="history">
<ul>
</ul>
<p class="clear_history">
<a onclick="clear_history()">清除记录</a>
</p>
</div>
</div>
<div class="form_item">
<input id="password" type="password" value="" placeholder="请输入密码" />
</div>
<div class="form_item text_right">
<!-- <div class="error">
|
876f9385
孙向锦
李聪定制
|
288
289
290
|
<img src="static/login/login_5.png" alt="">
<span class="error_info">密码输入不正确</span>
</div> -->
|
7fbab65d
孙向锦
记住密码,清除记录。
|
291
292
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
|
<input id="rem_flag" style="width:17px;height:17px;"
type="checkbox"> <span>记住密码</span>
</div>
<div class="form_item">
<button href="#" type="submit" onclick="severCheck();"
class="login_btn">登录</button>
</div>
</div>
</div>
<div class="login_box_right_box">
<div class="dec">
<p class="dec_big">南昊考试作业管理平台</p>
<p class="dec_mini">让天下师生减负提分!</p>
</div>
<div class="right_box_img">
<img src="static/login/login_11.png" alt="">
</div>
<div class="right_box_bottom_img">
<img src="static/login/login_7.png" alt="">
</div>
</div>
</div>
<div class="left_bottom_img">
<img src="static/login/login_10.png" alt="">
</div>
<div class="right_bottom_img">
<img src="static/login/cycle.png" alt="">
</div>
</div>
<script type="text/javascript">
|
a9f5da51
孙向锦
更换首页
|
322
|
|
3371dbc6
孙向锦
0720 版本
|
323
324
325
|
if(window.top != window.self){
window.top.location.href = "<%=basePath%>";
}
|
d318653d
=
1、登录页添加回车交互
|
326
327
328
329
330
331
332
333
334
|
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
孙向锦
首页登录代码还原
|
335
|
|
7fbab65d
孙向锦
记住密码,清除记录。
|
336
337
338
339
340
|
$(".icon_down").click(function(){
$("#loginname").focus();
});
|
a9f5da51
孙向锦
更换首页
|
341
342
343
344
345
346
347
|
//客户端校验
function check() {
if ($("#loginname").val() == "") {
$("#loginname").tips({
side : 2,
msg : '用户名不得为空',
|
2ce09a20
jack
1.修改bug
|
348
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
349
350
|
time : 3
});
|
a9f5da51
孙向锦
更换首页
|
351
352
353
354
355
356
357
358
359
|
$("#loginname").focus();
return false;
} else {
$("#loginname").val(jQuery.trim($('#loginname').val()));
}
if ($("#password").val() == "") {
$("#password").tips({
side : 2,
msg : '密码不得为空',
|
2ce09a20
jack
1.修改bug
|
360
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
361
362
|
time : 3
});
|
a9f5da51
孙向锦
更换首页
|
363
364
365
366
|
$("#password").focus();
return false;
}
|
2ce09a20
jack
1.修改bug
|
367
|
|
a9f5da51
孙向锦
更换首页
|
368
369
370
|
return true;
}
|
377085db
jack
1、优化登录界面历史记录交互
|
371
372
|
|
a9f5da51
孙向锦
更换首页
|
373
|
|
ad5081d3
孙向锦
初始化项目
|
374
375
376
377
378
|
//服务器校验
function severCheck(){
if(check()){
var loginname = $("#loginname").val();
var password = $("#password").val();
|
81df8ce6
孙向锦
去掉多余的信息
|
379
|
var code = loginname+";;;"+password+";;;" + $("#code").val();
|
ad5081d3
孙向锦
初始化项目
|
380
381
382
383
384
385
386
387
|
$.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
孙向锦
首页登录代码还原
|
388
389
|
if($("#rem_flag").prop("checked")) //如果选择了记住密码
saveCookie();
|
338594c8
孙向锦
添加教师端页面
|
390
391
|
if(data.teacher != null){
window.location.href="main/teacher";
|
6b3a5ad0
孙向锦
添加管理员界面
|
392
393
|
}else if(data.admin != null){
window.location.href="main/admin";
|
338594c8
孙向锦
添加教师端页面
|
394
395
396
|
}else{
window.location.href="main/index";
}
|
ad5081d3
孙向锦
初始化项目
|
397
398
399
400
401
402
403
|
}else if("usererror" == data.result){
$("#loginname").tips({
side : 1,
msg : "用户名或密码有误",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
404
405
406
407
408
409
410
411
|
$("#loginname").focus();
}else if("codeerror" == data.result){
$("#code").tips({
side : 1,
msg : "验证码输入有误",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
412
413
414
415
416
417
418
419
|
$("#code").focus();
}else{
$("#loginname").tips({
side : 1,
msg : "缺少参数",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
420
421
422
423
424
425
|
$("#loginname").focus();
}
}
});
}
}
|
a9f5da51
孙向锦
更换首页
|
426
|
|
7231b755
孙向锦
记住密码
|
427
428
429
|
var storage=window.localStorage;
var userNameList=[];
var passWordList=[];
|
f6fc6e4e
孙向锦
首页登录代码还原
|
430
431
|
//console.log(JSON.parse(storage.getItem('userNameList')));
|
731a0e6e
孙向锦
密码历史
|
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
$("#loginname").focus(function(e){
$("#password").attr("type","password");
var _html="";
var u_list=JSON.parse(storage.getItem('userNameList'));
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();
}
});
|
7fbab65d
孙向锦
记住密码,清除记录。
|
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
|
$('.history').hover(function(){ //鼠标悬停下拉框时,解绑blur事件
$("#loginname").unbind("blur");
},function(){
$("#loginname").blur(function(){ //鼠标移出下拉框时,添加blur事件
$(".history").hide();
})
});
$(document).on('click','.history li',function(){
var p_list=JSON.parse(storage.getItem('passWordList'));
$("#loginname").val($(this).text());
$("#password").val(p_list[$(this).index()]);
$(".history").hide();
})
|
731a0e6e
孙向锦
密码历史
|
463
|
|
377085db
jack
1、优化登录界面历史记录交互
|
464
465
|
//清除历史记录
function clear_history(){
|
7fbab65d
孙向锦
记住密码,清除记录。
|
466
467
468
|
storage.clear();
$(".history").hide();
}
|
377085db
jack
1、优化登录界面历史记录交互
|
469
|
//保存登录记录
|
ad5081d3
孙向锦
初始化项目
|
470
|
function saveCookie() {
|
f6fc6e4e
孙向锦
首页登录代码还原
|
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
|
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));
}
}
|
f6fc6e4e
孙向锦
首页登录代码还原
|
500
|
//console.log(userNameList);
|
f6fc6e4e
孙向锦
首页登录代码还原
|
501
502
|
}
|
ad5081d3
孙向锦
初始化项目
|
503
|
}
|
ad5081d3
孙向锦
初始化项目
|
504
|
</script>
|
7fbab65d
孙向锦
记住密码,清除记录。
|
505
506
507
508
509
|
<!-- 软键盘控件start -->
<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
孙向锦
修改域名问题
|
510
|
</body>
|
ad5081d3
孙向锦
初始化项目
|
511
|
</html>
|