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>
|
fd0087a8
孙向锦
添加英语语言
|
30
31
32
33
34
|
<script type="text/javascript" >
if(lang() != 'zh'){
}
</script>
|
eef2f078
孙向锦
修改域名问题
|
35
|
<style type="text/css">
|
876f9385
孙向锦
李聪定制
|
36
37
38
39
40
|
html,body{
width:100%;
height:100%;
margin:0;
padding:0;
|
21804155
jack
1、修改jq和bootstrap路径
|
41
|
}
|
876f9385
孙向锦
李聪定制
|
42
43
44
|
img{
width:100%;
display: inherit;
|
eef2f078
孙向锦
修改域名问题
|
45
|
}
|
876f9385
孙向锦
李聪定制
|
46
47
|
p{
margin:0;
|
377085db
jack
1、优化登录界面历史记录交互
|
48
|
}
|
876f9385
孙向锦
李聪定制
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
.login{
width:100%;
min-width: 1200px;
height:100%;
background: #EFEEF5;
}
.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);
}
.error{
font-size: 12px;
color:#F25F62;
float: left;
}
.error img{
width: 12px;
float:left;
margin-top:3px;
margin-left:10px;
}
.error_info{
margin-left: 5px;
}
input:focus-within{
border-style:solid;
border-color: #48A3A5;
box-shadow: 0 0 5px #48A3A5;
}
.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;
}
.login_box .login_box_left_box .login_box_contianer{
margin-top:60px;
}
.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;
}
.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
}
.login_btn{
outline-style: none;
border: none;
color: #fff;
width:90%;
height:50px;
line-height: 50px;
border-radius:8px;
background: #48A3A5;
}
.login_box .login_box_right_box{
height:100%;
overflow: hidden;
margin-left: 40%;
position: relative;
background: #48A3A6;
}
.login_box .login_box_right_box .dec{
position: absolute;
bottom:100px;
left:100px;
}
.login_box .login_box_right_box .dec_big{
font-size: 40px;
color: #ECECEC;
}
.login_box .login_box_right_box .dec_mini{
font-size: 24px;
color: #ECECEC;
}
.login_box .login_box_right_box .right_box_img{
width: 400px;
position: absolute;
right:-23px;
top:-25px;
}
.right_box_bottom_img{
width: 200px;
height:200px;
background: #fff;
border-radius: 100px;
position: absolute;
bottom:-100px;
right:-100px;
}
.right_box_bottom_img img{
width:25%;
margin:30px 0 0 30px;
}
.login .left_bottom_img{
position: absolute;
bottom:0;
left:0;
width:19%;
}
.login .right_bottom_img{
width:6.25%;
position: absolute;
right:5%;
bottom:3%;
}
.text_right{
text-align: right !important;
}
|
85c67fc0
孙向锦
登录 记住密码
|
184
|
.text_right input{
|
876f9385
孙向锦
李聪定制
|
185
186
187
188
189
|
display: inline;
vertical-align: middle;
}
.text_right span{
vertical-align: middle;
|
377085db
jack
1、优化登录界面历史记录交互
|
190
|
}
|
eef2f078
孙向锦
修改域名问题
|
191
|
</style>
|
ad5081d3
孙向锦
初始化项目
|
192
|
|
eef2f078
孙向锦
修改域名问题
|
193
194
195
|
<!-- HTML5 shim 和 Respond.js 是为了让 IE8 支持 HTML5 元素和媒体查询(media queries)功能 -->
<!-- 警告:通过 file:// 协议(就是直接将 html 页面拖拽到浏览器中)访问页面时 Respond.js 不起作用 -->
<!--[if lt IE 9]>
|
a9f5da51
孙向锦
更换首页
|
196
197
198
|
<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
孙向锦
修改域名问题
|
199
200
|
</head>
<body>
|
876f9385
孙向锦
李聪定制
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
<div class="login">
<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="" placeholder="请输入用户名" />
</div>
<div class="form_item">
<input id="password" type="password" value="" placeholder="请输入密码" />
</div>
<div class="form_item text_right">
<!-- <div class="error">
<img src="static/login/login_5.png" alt="">
<span class="error_info">密码输入不正确</span>
</div> -->
|
85c67fc0
孙向锦
登录 记住密码
|
221
222
|
<input id="rem_flag" style="width:17px;height:17px;" type="checkbox">
<span >记住密码</span>
|
876f9385
孙向锦
李聪定制
|
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
|
</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>
|
eef2f078
孙向锦
修改域名问题
|
250
|
<script type="text/javascript">
|
a9f5da51
孙向锦
更换首页
|
251
|
|
3371dbc6
孙向锦
0720 版本
|
252
253
254
|
if(window.top != window.self){
window.top.location.href = "<%=basePath%>";
}
|
d318653d
=
1、登录页添加回车交互
|
255
256
257
258
259
260
261
262
263
|
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
孙向锦
首页登录代码还原
|
264
|
|
a9f5da51
孙向锦
更换首页
|
265
266
267
268
269
270
271
|
//客户端校验
function check() {
if ($("#loginname").val() == "") {
$("#loginname").tips({
side : 2,
msg : '用户名不得为空',
|
2ce09a20
jack
1.修改bug
|
272
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
273
274
|
time : 3
});
|
a9f5da51
孙向锦
更换首页
|
275
276
277
278
279
280
281
282
283
|
$("#loginname").focus();
return false;
} else {
$("#loginname").val(jQuery.trim($('#loginname').val()));
}
if ($("#password").val() == "") {
$("#password").tips({
side : 2,
msg : '密码不得为空',
|
2ce09a20
jack
1.修改bug
|
284
|
bg : '#FF5080',
|
a9f5da51
孙向锦
更换首页
|
285
286
|
time : 3
});
|
a9f5da51
孙向锦
更换首页
|
287
288
289
290
|
$("#password").focus();
return false;
}
|
2ce09a20
jack
1.修改bug
|
291
|
|
a9f5da51
孙向锦
更换首页
|
292
293
294
|
return true;
}
|
377085db
jack
1、优化登录界面历史记录交互
|
295
296
|
|
a9f5da51
孙向锦
更换首页
|
297
|
|
ad5081d3
孙向锦
初始化项目
|
298
299
300
301
302
|
//服务器校验
function severCheck(){
if(check()){
var loginname = $("#loginname").val();
var password = $("#password").val();
|
81df8ce6
孙向锦
去掉多余的信息
|
303
|
var code = loginname+";;;"+password+";;;" + $("#code").val();
|
ad5081d3
孙向锦
初始化项目
|
304
305
306
307
308
309
310
311
|
$.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
孙向锦
首页登录代码还原
|
312
313
|
if($("#rem_flag").prop("checked")) //如果选择了记住密码
saveCookie();
|
338594c8
孙向锦
添加教师端页面
|
314
315
|
if(data.teacher != null){
window.location.href="main/teacher";
|
6b3a5ad0
孙向锦
添加管理员界面
|
316
317
|
}else if(data.admin != null){
window.location.href="main/admin";
|
338594c8
孙向锦
添加教师端页面
|
318
319
320
|
}else{
window.location.href="main/index";
}
|
ad5081d3
孙向锦
初始化项目
|
321
322
323
324
325
326
327
|
}else if("usererror" == data.result){
$("#loginname").tips({
side : 1,
msg : "用户名或密码有误",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
328
329
330
331
332
333
334
335
|
$("#loginname").focus();
}else if("codeerror" == data.result){
$("#code").tips({
side : 1,
msg : "验证码输入有误",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
336
337
338
339
340
341
342
343
|
$("#code").focus();
}else{
$("#loginname").tips({
side : 1,
msg : "缺少参数",
bg : '#FF5080',
time : 15
});
|
ad5081d3
孙向锦
初始化项目
|
344
345
346
347
348
349
|
$("#loginname").focus();
}
}
});
}
}
|
a9f5da51
孙向锦
更换首页
|
350
|
|
7231b755
孙向锦
记住密码
|
351
352
353
|
var storage=window.localStorage;
var userNameList=[];
var passWordList=[];
|
f6fc6e4e
孙向锦
首页登录代码还原
|
354
355
|
//console.log(JSON.parse(storage.getItem('userNameList')));
|
731a0e6e
孙向锦
密码历史
|
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
$("#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();
}
});
|
377085db
jack
1、优化登录界面历史记录交互
|
373
374
375
376
377
378
379
380
381
382
383
|
//清除历史记录
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
|
384
|
$(".mb_head .close img").css("display","none");
|
377085db
jack
1、优化登录界面历史记录交互
|
385
386
|
}
//保存登录记录
|
ad5081d3
孙向锦
初始化项目
|
387
|
function saveCookie() {
|
f6fc6e4e
孙向锦
首页登录代码还原
|
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
|
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
孙向锦
首页登录代码还原
|
417
|
//console.log(userNameList);
|
f6fc6e4e
孙向锦
首页登录代码还原
|
418
419
|
}
|
ad5081d3
孙向锦
初始化项目
|
420
|
}
|
ad5081d3
孙向锦
初始化项目
|
421
|
</script>
|
eef2f078
孙向锦
修改域名问题
|
422
|
<!-- 软键盘控件start -->
|
21804155
jack
1、修改jq和bootstrap路径
|
423
424
|
<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
孙向锦
修改域名问题
|
425
|
</body>
|
ad5081d3
孙向锦
初始化项目
|
426
|
</html>
|