移除了滑动验证码的延迟渲染
This commit is contained in:
@@ -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 }}
|
||||||
|
|||||||
Reference in New Issue
Block a user