diff --git a/eiam-console/src/main/console-fe/src/app.tsx b/eiam-console/src/main/console-fe/src/app.tsx index 5540ca23..f6770a65 100644 --- a/eiam-console/src/main/console-fe/src/app.tsx +++ b/eiam-console/src/main/console-fe/src/app.tsx @@ -53,9 +53,9 @@ const goLogin = () => { * 获取当前用户信息 */ const fetchUserInfo = async (): Promise => { - const { result, success } = await getCurrent(); - if (success && result) { - return result; + const result = await getCurrent().catch(() => undefined); + if (result?.success && result.result) { + return result.result; } return undefined; }; diff --git a/eiam-console/src/main/console-fe/src/pages/user/Profile/components/Security.tsx b/eiam-console/src/main/console-fe/src/pages/user/Profile/components/Security.tsx index 9a87a06f..df5b3c4c 100644 --- a/eiam-console/src/main/console-fe/src/pages/user/Profile/components/Security.tsx +++ b/eiam-console/src/main/console-fe/src/pages/user/Profile/components/Security.tsx @@ -78,21 +78,9 @@ const SecurityView = () => { } }, [refresh]); - const passwordStrength = { - strong: , - medium: , - weak: , - }; - const getData = () => [ { title: '账户密码', - description: ( - <> - 当前密码强度: - {passwordStrength.strong} - - ), actions: [ { } }, [refresh]); - const passwordStrength = { - strong: , - medium: , - weak: , - }; const getData = () => [ { title: '账户密码', - description: ( - <> - 当前密码强度: - {passwordStrength.strong} - - ), actions: [