mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-23 06:46:09 +08:00
修复登录成功获取用户信息
This commit is contained in:
parent
460a1750f4
commit
bdecdce118
|
@ -101,7 +101,7 @@ export default function (props: any) {
|
|||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (systemInfo && systemInfo.isInitialized && !user.username) {
|
||||
if (systemInfo && systemInfo.isInitialized) {
|
||||
getUser();
|
||||
}
|
||||
}, [props.location.pathname]);
|
||||
|
|
|
@ -18,7 +18,7 @@ import { MobileOutlined } from '@ant-design/icons';
|
|||
const FormItem = Form.Item;
|
||||
const { Countdown } = Statistic;
|
||||
|
||||
const Login = () => {
|
||||
const Login = ({ reloadUser }: any) => {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [waitTime, setWaitTime] = useState<any>();
|
||||
const { theme } = useTheme();
|
||||
|
@ -100,8 +100,8 @@ const Login = () => {
|
|||
<div>上次登录状态:{retries > 0 ? `失败${retries}次` : '成功'}</div>
|
||||
</>
|
||||
),
|
||||
duration: 5,
|
||||
});
|
||||
reloadUser();
|
||||
history.push('/crontab');
|
||||
} else if (data.code === 100) {
|
||||
message.warn(data.message);
|
||||
|
|
Loading…
Reference in New Issue
Block a user