diff --git a/src/servlet/account/login.java b/src/servlet/account/login.java new file mode 100644 index 0000000..7bb4417 --- /dev/null +++ b/src/servlet/account/login.java @@ -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 { + + } +} diff --git a/web/webPage/cssFile/images/login-img1.jpg b/web/cssFile/images/login-img1.jpg similarity index 100% rename from web/webPage/cssFile/images/login-img1.jpg rename to web/cssFile/images/login-img1.jpg diff --git a/web/webPage/cssFile/images/login-img2.jpg b/web/cssFile/images/login-img2.jpg similarity index 100% rename from web/webPage/cssFile/images/login-img2.jpg rename to web/cssFile/images/login-img2.jpg diff --git a/web/webPage/cssFile/login-style.css b/web/cssFile/login-style.css similarity index 84% rename from web/webPage/cssFile/login-style.css rename to web/cssFile/login-style.css index 880ff00..bdf4ad7 100644 --- a/web/webPage/cssFile/login-style.css +++ b/web/cssFile/login-style.css @@ -46,7 +46,7 @@ body{ height: 40px; border-radius: 5px; 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{ background-color: #e3e3e3; @@ -94,7 +94,6 @@ body{ } .register-submit-style{ position: absolute; - top: 280px; width: 300px; height: 40px; border-radius: 5px; @@ -114,14 +113,17 @@ body{ .register-input-text.e-mail-text{ top:190px; } +.register-input-text.phone-number{ + top:255px; +} .register-input-text.password-text{ - top: 255px; + top: 320px; } .register-input-text.check-password-text{ - top:320px; + top:385px; } .register-submit-style{ - top: 395px; + top: 440px; } .register-input-text:hover{ background-color: #e7e0ea; @@ -161,4 +163,27 @@ body{ } .to-login{ 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%; } \ No newline at end of file diff --git a/web/holle.jsp b/web/holle.jsp deleted file mode 100644 index bc42a4c..0000000 --- a/web/holle.jsp +++ /dev/null @@ -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" %> - - - Title - - - - - -
holle
-
holle
- - diff --git a/web/webPage/jsFile/jquery-3.3.1.js b/web/jsFile/jquery-3.3.1.js similarity index 100% rename from web/webPage/jsFile/jquery-3.3.1.js rename to web/jsFile/jquery-3.3.1.js diff --git a/web/jsFile/login.js b/web/jsFile/login.js new file mode 100644 index 0000000..38bf8f2 --- /dev/null +++ b/web/jsFile/login.js @@ -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); + }) + diff --git a/web/webPage/Login.jsp b/web/login.jsp similarity index 84% rename from web/webPage/Login.jsp rename to web/login.jsp index bd5e5cb..92c536f 100644 --- a/web/webPage/Login.jsp +++ b/web/login.jsp @@ -24,8 +24,9 @@
-
- GDMS
+ + @@ -38,20 +39,24 @@
登陆
+ - + - +
+
diff --git a/web/server.jsp b/web/server.jsp deleted file mode 100644 index 361f85e..0000000 --- a/web/server.jsp +++ /dev/null @@ -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" %> - - - Title - - -<%!Date date =new Date();%> -
时间是:<%=date%>
- - diff --git a/web/test5.js b/web/test5.js deleted file mode 100644 index 49b728b..0000000 --- a/web/test5.js +++ /dev/null @@ -1,7 +0,0 @@ -function test6() { - $('.tes').load('server.jsp .testp'); - -} -$(document).ready(function () { - window.setInterval('test6()',1000); -}); \ No newline at end of file diff --git a/web/updateT.js b/web/updateT.js deleted file mode 100644 index b118fde..0000000 --- a/web/updateT.js +++ /dev/null @@ -1,7 +0,0 @@ -function showtime() { - var tim=new Date(); - $('.tes2').html(tim); -} -$(document).ready(function () { - window.setInterval('showtime()',1000); -}) \ No newline at end of file