From eed6920d4a3563766a7ec0e4cd7bd537000aaa36 Mon Sep 17 00:00:00 2001 From: LostSalt Date: Sat, 14 Feb 2026 00:11:00 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=BA=86=E6=BB=91=E5=8A=A8?= =?UTF-8?q?=E9=AA=8C=E8=AF=81=E7=A0=81=E7=9A=84=E5=BB=B6=E8=BF=9F=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/auth/page.tsx | 26 +++----------------------- 1 file changed, 3 insertions(+), 23 deletions(-) diff --git a/src/app/auth/page.tsx b/src/app/auth/page.tsx index 93d7040..3667d22 100644 --- a/src/app/auth/page.tsx +++ b/src/app/auth/page.tsx @@ -169,26 +169,8 @@ export default function AuthPage() { if (success) { setIsCaptchaVerified(true); setShowCaptcha(false); - // 测试模式:验证码验证成功后,直接模拟注册成功 - // 方便测试完整流程,无需实际调用注册API - setIsLoading(true); - setAuthError(''); - - try { - // 模拟异步操作 - setTimeout(() => { - errorManager.showSuccess('注册成功!欢迎加入CarrotSkin!'); - router.push('/'); - }, 500); - } catch (error) { - const errorMessage = error instanceof Error ? error.message : '注册失败,请稍后重试'; - setAuthError(errorMessage); - errorManager.showError(errorMessage); - // 注册失败时重置验证码状态 - setIsCaptchaVerified(false); - } finally { - setIsLoading(false); - } + // 验证码验证成功后,继续注册流程 + handleRegisterAfterCaptcha(); } else { setIsCaptchaVerified(false); setShowCaptcha(false); @@ -680,8 +662,6 @@ export default function AuthPage() { )} - - {/* Submit Button */} ); -} +} \ No newline at end of file