Commit 18d92ecd authored by 文旺-丰林-DEV's avatar 文旺-丰林-DEV

fix login error not show message

parent c49c0059
import styles from './index.less'; import styles from './index.less';
import { Button, Checkbox, Form, Input, Modal } from 'antd'; import { Button, Checkbox, Form, Input, Modal, message } from 'antd';
import { LockOutlined, UserOutlined } from '@ant-design/icons'; import { LockOutlined, UserOutlined } from '@ant-design/icons';
import logoSvg from '../../assets/logo.svg'; import logoSvg from '../../assets/logo.svg';
import { useEffect, useRef, useState } from 'react'; import { useEffect, useRef, useState } from 'react';
...@@ -53,6 +53,7 @@ const LoginModal = (props: ILoginModalProps) => { ...@@ -53,6 +53,7 @@ const LoginModal = (props: ILoginModalProps) => {
setLoading(false); setLoading(false);
reset(); reset();
} catch (error) { } catch (error) {
message.error('账号或者密码错误');
setLoading(false); setLoading(false);
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment