团队冲刺博客
完成的任务:
搭建开发环境;
完成用户管理功能的前后端Stub。
计划任务:
完善用户管理功能的后端代码,包括实现用户注册、登录、退出等接口;
设计用户管理功能的前端UI,并实现与后端接口的对接。
后端代码示例:
@RestController
public class UserController {
@Autowired
private UserService userService;
@PostMapping("/register")
public ResponseEntity<UserVO> register(@RequestBody UserDTO userDTO) {
User user = userService.register(userDTO);
if (user != null) {
return ResponseEntity.ok().body(new UserVO(user));
} else {
return ResponseEntity.badRequest().build();
}
}
@PostMapping("/login")
public ResponseEntity<UserVO> login(@RequestBody LoginDTO loginDTO) {
User user = userService.login(loginDTO);
if (user != null) {
return ResponseEntity.ok().body(new UserVO(user));
} else {
return ResponseEntity.badRequest().build();
}
}
}
5.3
完成的任务:
实现用户管理功能的注册、登录、退出接口;
实现用户管理功能的前端UI。
计划任务:
细化课程管理功能的需求,并讨论技术实现方案;
就技术实现方案进行任务拆分、评估,制定下一阶段的开发计划。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Login</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.6.0/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/3.6.0/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/popper.js/2.9.3/umd/popper.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/4.6.0/js/bootstrap.min.js"></script>
<script src="https://cdn.staticfile.org/jquery-validate/1.19.3/jquery.validate.min.js"></script>
<script src="js/login.js"></script>
</head>
<body>
<div class="container mt-5">
<h1>Login</h1>
<form id="login-form" class="needs-validation" novalidate>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" name="email" required>
<div class="invalid-feedback">Please enter a valid email address.</div>
</div>
<div class="form-group">
<label for="password">Password</label>
<input type="password" class="form-control" id="password" name="password" required>
<div class="invalid-feedback">Please enter a password.</div>
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="rememberMe">
<label class="form-check-label" for="rememberMe">Remember me</label>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</body>
</html>