From 32970bca7128db464f0157908b7173e23e066c7a Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 22 May 2022 18:07:48 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layouts/index.tsx | 4 ++-- src/pages/login/index.tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index e48c03b3..8479ac31 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -86,8 +86,8 @@ export default function (props: any) { }); }; - const reloadUser = () => { - getUser(false); + const reloadUser = (needLoading = false) => { + getUser(needLoading); }; const setTheme = () => { diff --git a/src/pages/login/index.tsx b/src/pages/login/index.tsx index 62b0ff73..e245309a 100644 --- a/src/pages/login/index.tsx +++ b/src/pages/login/index.tsx @@ -101,7 +101,7 @@ const Login = ({ reloadUser }: any) => { ), }); - reloadUser(); + reloadUser(true); history.push('/crontab'); } else if (data.code === 100) { message.warn(data.message);