Merge remote-tracking branch 'remotes/origin/hechu1'

# Conflicts:
#	src/servlet/account/login.java
#	web/WEB-INF/web.xml
#	web/webPage/jsFile/login.js
wlf
zhai_lw 6 years ago
commit 41a590d63a

@ -0,0 +1,32 @@
package servlet.account;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import core.user.Student;
import core.user.User;
@WebServlet("/login")
public class login extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String id=request.getParameter("id");
String password=request.getParameter("password");
if(id=="201630126050"&&password=="823169880")
{
request.getRequestDispatcher("/service").forward(request,response);
}
else
response.sendRedirect("");
}
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
}
}

Before

Width:  |  Height:  |  Size: 452 KiB

After

Width:  |  Height:  |  Size: 452 KiB

Before

Width:  |  Height:  |  Size: 650 KiB

After

Width:  |  Height:  |  Size: 650 KiB

@ -46,7 +46,7 @@ body{
height: 40px; height: 40px;
border-radius: 5px; border-radius: 5px;
left: 29px; left: 29px;
border:1px solid rgba(0, 0, 0, 0.37);; border:1px solid rgba(0, 0, 0, 0.37);
} }
.login-cont .input-text:hover{ .login-cont .input-text:hover{
background-color: #e3e3e3; background-color: #e3e3e3;
@ -94,7 +94,6 @@ body{
} }
.register-submit-style{ .register-submit-style{
position: absolute; position: absolute;
top: 280px;
width: 300px; width: 300px;
height: 40px; height: 40px;
border-radius: 5px; border-radius: 5px;
@ -114,14 +113,17 @@ body{
.register-input-text.e-mail-text{ .register-input-text.e-mail-text{
top:190px; top:190px;
} }
.register-input-text.phone-number{
top:255px;
}
.register-input-text.password-text{ .register-input-text.password-text{
top: 255px; top: 320px;
} }
.register-input-text.check-password-text{ .register-input-text.check-password-text{
top:320px; top:385px;
} }
.register-submit-style{ .register-submit-style{
top: 395px; top: 440px;
} }
.register-input-text:hover{ .register-input-text:hover{
background-color: #e7e0ea; background-color: #e7e0ea;
@ -161,4 +163,27 @@ body{
} }
.to-login{ .to-login{
display: none; display: none;
}
.logo2{
position: absolute;
left: 140px;
top: 20px;
width: 120px;
height: 40px;
color: white;
background-color: #dc514a;
border-radius: 12px;
border: 1px solid rgba(0, 0, 0, 0.1);
font-size: 20px;
font-weight: bolder;
line-height: 40px;
text-align: center;
}
.main{
}
.bottom-bar{
background-color: #f7edda;
border: 1px solid rgba(0, 0, 0, 0.16);
height: 40px;
width: 100%;
} }

@ -1,20 +0,0 @@
<%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2019/1/9
Time: 11:02
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
<script src="webPage/jsFile/jquery-3.3.1.js" type="text/javascript"></script>
<script src="test5.js" type="text/javascript"></script>
<script src="updateT.js" type="text/javascript"></script>
</head>
<body>
<div class="tes">holle</div>
<div class="tes2">holle</div>
</body>
</html>

@ -0,0 +1,55 @@
function showRegister() {
$('.register-cont').css('display','block');
$('.login-cont').css('display','none');
$('.to-register').css( 'display','none');
$('.to-login').css( 'display','block');
}
function showlogin() {
$('.register-cont').css('display','none');
$('.login-cont').css('display','block');
$('.to-register').css( 'display','block');
$('.to-login').css( 'display','none');
}
function isEmpty(e)
{
$('.input-text').each(function () {
if($(this).val().length<=0)
{
e.preventDefault();
alert($(this).attr('name')+'不能为空');
return false;
}
})
}
function isEmpty2(e)
{
var isem=false;
$('.register-input-text').each(function () {
if($(this).val().length<=0)
{
e.preventDefault();
alert($(this).attr('name')+'不能为空');
isem=true;
return false;
}
}
)
if($('.register-input-text').eq(4).val()!=$('.register-input-text').eq(5)
.val()&&!isem)
{
e.preventDefault();
alert('两次密码不同');
return false;
}
}
$(document).ready(
function () {
$('.to-register').on('click', showRegister);
$('.to-login').on('click', showlogin);
$('.submit-style').on('click',isEmpty);
$('.register-submit-style').on('click',isEmpty2);
})

@ -24,8 +24,9 @@
</div> </div>
<div class="login-cont"> <div class="login-cont">
<form method="post" action="#"> <div class="logo2">GDMS</div>
<input class="input-text username-text" type="text" name="username" <form method="post" action="/login">
<input class="input-text username-text" type="text" name="id"
placeholder="请输入学号"> placeholder="请输入学号">
<input class="input-text password-text" type="password" name="password" <input class="input-text password-text" type="password" name="password"
placeholder="请输入密码"> placeholder="请输入密码">
@ -38,20 +39,24 @@
<div class="to-any to-login">登陆</div> <div class="to-any to-login">登陆</div>
</div> </div>
<div class="register-cont"> <div class="register-cont">
<form method="post" action="#"> <form method="post" action="#">
<input class="register-input-text sno-text" type="text" name="sno" <input class="register-input-text sno-text" type="text" name="id"
placeholder="学号"> placeholder="学号">
<input class="register-input-text name-text" type="text" name="name" <input class="register-input-text name-text" type="text" name="name"
placeholder="姓名"> placeholder="姓名">
<input class="register-input-text e-mail-text" type="text" name="e-mail" <input class="register-input-text e-mail-text" type="text" name="e-mail"
placeholder="邮箱"> placeholder="邮箱">
<input class="register-input-text phone-number" type="text" name="phone-number"
placeholder="请输入电话">
<input class="register-input-text password-text" type="password" name="password" <input class="register-input-text password-text" type="password" name="password"
placeholder="请输入密码"> placeholder="请输入密码">
<input class="register-input-text check-password-text" type="password" name="password" <input class="register-input-text check-password-text" type="password" name="password-check"
placeholder="请输入密码"> placeholder="请确认密码">
<input class="register-submit-style" type="submit" value="注册"> <input class="register-submit-style" type="submit" value="注册">
</form> </form>
</div> </div>
<div class="bottom-bar"></div>
</div> </div>
</body> </body>
</html> </html>

@ -1,17 +0,0 @@
<%--
Created by IntelliJ IDEA.
User: lenovo
Date: 2019/1/9
Time: 12:11
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" import="java.util.Date" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%!Date date =new Date();%>
<div class="testp">时间是:<%=date%></div>
</body>
</html>

@ -1,7 +0,0 @@
function test6() {
$('.tes').load('server.jsp .testp');
}
$(document).ready(function () {
window.setInterval('test6()',1000);
});

@ -1,7 +0,0 @@
function showtime() {
var tim=new Date();
$('.tes2').html(tim);
}
$(document).ready(function () {
window.setInterval('showtime()',1000);
})
Loading…
Cancel
Save