From 94bf12af628c334538c56ddccf178c4f24cb03a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=A0=E6=B1=9F?= <15547749+cyj-050209@user.noreply.gitee.com> Date: Thu, 9 Oct 2025 02:56:34 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BF=98=E8=AE=B0=E5=AF=86?= =?UTF-8?q?=E7=A0=81=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/mathlearning/ui/ChangeCodeFrame.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/java/mathlearning/ui/ChangeCodeFrame.java b/src/main/java/mathlearning/ui/ChangeCodeFrame.java index cace250..924f9ea 100644 --- a/src/main/java/mathlearning/ui/ChangeCodeFrame.java +++ b/src/main/java/mathlearning/ui/ChangeCodeFrame.java @@ -1,7 +1,5 @@ package mathlearning.ui; -import at.favre.lib.crypto.bcrypt.BCrypt; -import mathlearning.model.User; import mathlearning.service.EmailService; import mathlearning.service.UserService; @@ -194,20 +192,17 @@ public class ChangeCodeFrame extends JFrame { "请填写所有字段", "错误", JOptionPane.ERROR_MESSAGE); return; } - if (!password.equals(confirmPassword)) { JOptionPane.showMessageDialog(ChangeCodeFrame.this, "两次输入的密码不一致", "错误", JOptionPane.ERROR_MESSAGE); return; } - if (!userService.validatePassword(password)) { JOptionPane.showMessageDialog(ChangeCodeFrame.this, "密码必须为6-10位,且包含大小写字母和数字", "错误", JOptionPane.ERROR_MESSAGE); return; } - // 使用新的重置密码方法 if (userService.resetPasswordWithCode(email, code, password)) { JOptionPane.showMessageDialog(ChangeCodeFrame.this, "密码重置成功!", "成功", JOptionPane.INFORMATION_MESSAGE);