🐛 修复重置密码错误提示不显示

master
smallbun 2024-12-16 01:05:53 +08:00
parent f3eb0cde17
commit 9c135e74f3
1 changed files with 15 additions and 7 deletions

View File

@ -33,6 +33,7 @@ import { aesEcbEncrypt } from '@/utils/aes';
const prefixCls = 'topiam-login'; const prefixCls = 'topiam-login';
enum Status { enum Status {
password_invalid_error = 'password_invalid_error',
unknown_authentication_type = 'unknown_authentication_type', unknown_authentication_type = 'unknown_authentication_type',
password_validated_fail_error = 'password_validated_fail_error', password_validated_fail_error = 'password_validated_fail_error',
} }
@ -122,6 +123,14 @@ export default () => {
status: Status.password_validated_fail_error, status: Status.password_validated_fail_error,
message: message, message: message,
}); });
return;
}
if (status === Status.password_invalid_error) {
setStatus({
status: Status.password_invalid_error,
message: message,
});
return;
} }
if (status === Status.unknown_authentication_type) { if (status === Status.unknown_authentication_type) {
setStatus({ setStatus({
@ -163,8 +172,7 @@ export default () => {
}} }}
layout="vertical" layout="vertical"
> >
{status?.status === Status.password_validated_fail_error && {status?.message && (
status?.message && (
<> <>
<Message content={status?.message} /> <Message content={status?.message} />
<br /> <br />