feat: 日志优化
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import React from "react";
|
||||
import { FormControl, FormErrorMessage, HStack, Input, Button, Spinner } from "@chakra-ui/react";
|
||||
import { logger } from "../../utils/logger";
|
||||
|
||||
/**
|
||||
* 通用验证码输入组件
|
||||
@@ -26,7 +27,12 @@ export default function VerificationCodeInput({
|
||||
}
|
||||
} catch (error) {
|
||||
// 错误已经在父组件处理,这里只需要防止未捕获的 Promise rejection
|
||||
console.error('Send code error (caught in VerificationCodeInput):', error);
|
||||
logger.error('VerificationCodeInput', 'handleSendCode', error, {
|
||||
hasOnSendCode: !!onSendCode,
|
||||
countdown,
|
||||
isLoading,
|
||||
isSending
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user