移除了滑动验证码的延迟渲染

This commit is contained in:
2026-02-13 23:59:56 +08:00
parent 321b32e312
commit 00984b6d67
2 changed files with 23 additions and 5 deletions

View File

@@ -169,8 +169,26 @@ export default function AuthPage() {
if (success) {
setIsCaptchaVerified(true);
setShowCaptcha(false);
// 验证码验证成功后,继续注册流程
handleRegisterAfterCaptcha();
// 测试模式:验证码验证成功后,直接模拟注册成功
// 方便测试完整流程无需实际调用注册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);
}
} else {
setIsCaptchaVerified(false);
setShowCaptcha(false);