From c33bc6f2f31120fc2700650a3958b6c6b5f021b8 Mon Sep 17 00:00:00 2001 From: awenes <1121353141@qq.com> Date: Fri, 6 Oct 2023 18:43:59 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E7=AE=A1=E7=90=86=E7=AB=AF?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eiam-console/src/main/console-fe/src/app.tsx | 6 +++--- .../src/pages/user/Profile/components/Security.tsx | 12 ------------ .../src/pages/Account/components/Security.tsx | 11 ----------- 3 files changed, 3 insertions(+), 26 deletions(-) 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: [