移除了滑动验证码的延迟渲染
This commit is contained in:
@@ -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() {
|
||||
)}
|
||||
</AnimatePresence>
|
||||
|
||||
|
||||
|
||||
{/* Submit Button */}
|
||||
<motion.div
|
||||
initial={{ opacity: 0, y: 20 }}
|
||||
@@ -788,4 +768,4 @@ export default function AuthPage() {
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user