解决了不跟手问题 #8

Merged
lan merged 2 commits from feature/slide-captcha into main 2026-02-15 00:26:05 +08:00
Showing only changes of commit eed6920d4a - Show all commits

View File

@@ -169,26 +169,8 @@ export default function AuthPage() {
if (success) { if (success) {
setIsCaptchaVerified(true); setIsCaptchaVerified(true);
setShowCaptcha(false); setShowCaptcha(false);
// 测试模式:验证码验证成功后,直接模拟注册成功 // 验证码验证成功后,继续注册流程
// 方便测试完整流程无需实际调用注册API handleRegisterAfterCaptcha();
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 { } else {
setIsCaptchaVerified(false); setIsCaptchaVerified(false);
setShowCaptcha(false); setShowCaptcha(false);
@@ -680,8 +662,6 @@ export default function AuthPage() {
)} )}
</AnimatePresence> </AnimatePresence>
{/* Submit Button */} {/* Submit Button */}
<motion.div <motion.div
initial={{ opacity: 0, y: 20 }} initial={{ opacity: 0, y: 20 }}
@@ -788,4 +768,4 @@ export default function AuthPage() {
</div> </div>
); );
} }