add pass modify

This commit is contained in:
sobear 2024-05-15 23:28:26 +08:00
parent 8a1f2b8539
commit c3da2231e1
7 changed files with 64 additions and 38 deletions

View File

@ -23,7 +23,7 @@ public class WorkerOrderStatusController {
}
@RequestMapping("/updateOrderStatus")
@RequestMapping("/worker/updateOrderStatus.do")
public String updateOrderStatus(HttpServletRequest request,Model model) {
int orderId = Integer.parseInt(request.getParameter("orderId"));
if(orderDao.statusModify(orderId) != 0){

View File

@ -19,4 +19,6 @@ public interface WorkerDao {
}

View File

@ -71,4 +71,7 @@ public class WorkerDaoImpl implements WorkerDao {
}
}

View File

@ -50,4 +50,23 @@
</ul>
</div>
</c:when>
<c:when test="${not empty sessionScope.workerUser}">
<hr>
<div class="dropdown">
<a href="#" class="d-flex align-items-center link-body-emphasis text-decoration-none dropdown-toggle"
data-bs-toggle="dropdown" aria-expanded="false">
<img src="${webroot}/images/logo.jpg" alt="" width="32" height="32" class="rounded-circle me-2">
<strong>${sessionScope.workerUser.username}</strong>
</a>
<ul class="dropdown-menu text-small shadow">
<li><a class="dropdown-item" href="${webroot}/worker/worker_center_index.jsp">个人中心</a></li>
<li><a class="dropdown-item" href="${webroot}/worker/HistoryLogin.do">我的登录历史</a></li>
<li><a class="dropdown-item" href="${webroot}/worker/worker_modify.jsp">修改密码</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="${webroot}/logout.jsp">退出登录</a></li>
</ul>
</div>
</c:when>
</c:choose>

View File

@ -91,7 +91,7 @@
<a href="${webroot}/worker/HistoryLogin.do" class="nav-link link-body-emphasis" aria-current="page">
>> 历史登录记录
</a>
<a href="${webroot}/worker/worker_modify.jsp" class="nav-link link-body-emphasis" aria-current="page">
<a href="${webroot}/worker/pass.do" class="nav-link link-body-emphasis" aria-current="page">
>> 修改用户信息
</a>
</li>

View File

@ -85,7 +85,7 @@
<td>${order.faultDesc}</td>
<td>${order.faultImg}</td>
<td>
<a class="aButton" href="${webroot}/updateOrderStatus?orderId=${order.orderId}">
<a class="aButton" href="${webroot}/worker/updateOrderStatus.do?orderId=${order.orderId}">
${order.orderStatus == 1 ? '未完成' : '已完成'}
</a>
</td>

View File

@ -2,7 +2,7 @@
Created by IntelliJ IDEA.
User: sobear
Date: 2024/5/12
Time: 21:41
Time: 20:18
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
@ -11,7 +11,7 @@
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<c:set var="webroot" value="${pageContext.request.contextPath}"/>
<c:set var="title" value="工人端修改密码"/>
<c:set var="title" value="修改密码"/>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
@ -25,43 +25,45 @@
<main class="d-flex flex-nowrap">
<%@ include file="../includes/header.jsp" %>
<main class="w-100 m-auto">
<div class="container" style="margin: 50px;">
<table class="table table-bordered table-hover" id="tb">
<thead>
<tr>
<th>
<input type="checkbox">
</th>
<th>登录用户名</th>
<th>用户类型</th>
<th>登录ip</th>
<th>登录时间</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<input type="checkbox" class="checks">
</td>
<td>ve</td>
<td>ve</td>
<td>ve</td>
</tr>
<main class="form-signin w-100 m-auto">
<form action="${webroot}/worker/pass.do" method="post">
<img class="mb-4" src="${webroot}/images/logo.jpg" alt="" width="72" height="72">
<h1 class="h3 mb-3 fw-normal">修改密码</h1>
<c:if test="${not empty requestScope.workerPassMess}">
<div class="alert alert-warning" role="alert">
${requestScope.workerPassMess}
</div>
</c:if>
</tbody>
</table>
</div>
<div class="form-floating">
<input type="password" class="form-control" name="oldPassword" id="oldPassword" value="${oldPassword}"
required>
<label for="oldPassword">旧密码</label>
</div>
<div class="form-floating">
<input type="password" class="form-control" name="password" id="password" value="${password}" required>
<label for="password">密码</label>
</div>
<div class="form-floating">
<input type="password" class="form-control" name="confirmpass" id="confirmpass" value="${confirmpass}"
required>
<label for="confirmpass">确认密码</label>
</div>
<div class="input-group mb-3">
<input type="text" class="form-control" placeholder="验证码" name="code" id="code" required>
<span class="input-group-text">
<img src="${pageContext.request.contextPath}/includes/code.jsp" id="imagecode"
title="点击图片可刷新验证码"
onclick="this.src='${pageContext.request.contextPath}/includes/code.jsp?'+Math.random()">
</span>
</div>
<input class="btn btn-primary w-100 py-2" type="submit" id="submit">
<br/><br/>
</form>
</main>
</main>
<script src="${webroot}/js/pass.js"></script>
</body>
</html>