From 61cb1dec77ee3dffc2eb09ed95bfbeda80a3b1cb Mon Sep 17 00:00:00 2001 From: liyansheng <1761724207@qq.com> Date: Sun, 22 Dec 2024 21:02:08 +0800 Subject: [PATCH] =?UTF-8?q?fix<=E9=A1=B5=E9=9D=A2=E7=BB=93=E6=9E=84?= =?UTF-8?q?=E8=B0=83=E6=95=B4>?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/example/controller/LoginServlet.java | 2 +- src/main/webapp/cart.jsp | 27 +++++++++++- src/main/webapp/checkOrder.jsp | 2 +- src/main/webapp/computerList.jsp | 27 +++++++++++- src/main/webapp/index.jsp | 42 ++++++++++--------- src/main/webapp/myOrder.jsp | 27 +++++++++++- src/main/webapp/orders.jsp | 27 +++++++++++- src/main/webapp/result.jsp | 2 +- src/main/webapp/userList.jsp | 27 +++++++++++- 9 files changed, 155 insertions(+), 28 deletions(-) diff --git a/src/main/java/example/controller/LoginServlet.java b/src/main/java/example/controller/LoginServlet.java index 8c0397d..9d17784 100644 --- a/src/main/java/example/controller/LoginServlet.java +++ b/src/main/java/example/controller/LoginServlet.java @@ -26,7 +26,7 @@ public class LoginServlet extends HttpServlet { User user = userService.login(username, password); if(user!=null){ req.getSession().setAttribute("user",user); - resp.sendRedirect("/index.jsp"); + resp.sendRedirect("/computer?action=list"); }else{ req.getSession().setAttribute("msg","用户名或密码错误"); resp.sendRedirect("/msg.jsp"); diff --git a/src/main/webapp/cart.jsp b/src/main/webapp/cart.jsp index b5a17ef..c28da24 100644 --- a/src/main/webapp/cart.jsp +++ b/src/main/webapp/cart.jsp @@ -9,8 +9,33 @@ 购物车 +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 + + + +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
+

购物车

- 主页 + diff --git a/src/main/webapp/checkOrder.jsp b/src/main/webapp/checkOrder.jsp index 9c8f68c..b4f6a7d 100644 --- a/src/main/webapp/checkOrder.jsp +++ b/src/main/webapp/checkOrder.jsp @@ -20,6 +20,6 @@
- 主页 + \ No newline at end of file diff --git a/src/main/webapp/computerList.jsp b/src/main/webapp/computerList.jsp index ba6fd7f..e2c1381 100644 --- a/src/main/webapp/computerList.jsp +++ b/src/main/webapp/computerList.jsp @@ -11,6 +11,31 @@ +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 + + + +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
+

电脑产品列表

@@ -80,7 +105,7 @@ 发布电脑产品
- 主页 + \ No newline at end of file diff --git a/src/main/webapp/index.jsp b/src/main/webapp/index.jsp index 7bf0ec1..45d39d6 100644 --- a/src/main/webapp/index.jsp +++ b/src/main/webapp/index.jsp @@ -3,28 +3,30 @@ -

电脑商城-首页

-

你好!${sessionScope.user.username}

- - 电脑选购 - - 我的购物车 - 我的订单 - +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 - - 用户列表 - 所有订单 - 退出 - - - -

请登录后查看更多内容~

-
- 注册 - 登录 -
+ +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
diff --git a/src/main/webapp/myOrder.jsp b/src/main/webapp/myOrder.jsp index e3fb895..7e40e1a 100644 --- a/src/main/webapp/myOrder.jsp +++ b/src/main/webapp/myOrder.jsp @@ -9,6 +9,31 @@ 我的订单 +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 + + + +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
+

我的订单

@@ -42,6 +67,6 @@


- 主页 + diff --git a/src/main/webapp/orders.jsp b/src/main/webapp/orders.jsp index d2a2cc7..70da03a 100644 --- a/src/main/webapp/orders.jsp +++ b/src/main/webapp/orders.jsp @@ -11,6 +11,31 @@ +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 + + + +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
+

订单列表

全部 | 待发货 | @@ -52,7 +77,7 @@

- 主页 + \ No newline at end of file diff --git a/src/main/webapp/result.jsp b/src/main/webapp/result.jsp index bfa40a7..e896d23 100644 --- a/src/main/webapp/result.jsp +++ b/src/main/webapp/result.jsp @@ -15,6 +15,6 @@

${requestScope.msg}


- 主页 + diff --git a/src/main/webapp/userList.jsp b/src/main/webapp/userList.jsp index 1e1f8f2..a3106f5 100644 --- a/src/main/webapp/userList.jsp +++ b/src/main/webapp/userList.jsp @@ -9,6 +9,31 @@ 系统用户 +
+

电脑商城

+

你好!${sessionScope.user.username}

+ + 电脑选购 + + 我的购物车 + 我的订单 + + + + 用户列表 + 所有订单 + + 退出 + + + +

请登录后查看更多内容~

+
+ 注册 + 登录 +
+
+

系统用户

@@ -36,6 +61,6 @@

- 主页 +