mirror of https://gitee.com/topiam/eiam
✨ 管理端个人中心
parent
4fa0746bfb
commit
c33bc6f2f3
|
@ -53,9 +53,9 @@ const goLogin = () => {
|
|||
* 获取当前用户信息
|
||||
*/
|
||||
const fetchUserInfo = async (): Promise<API.CurrentUser | undefined> => {
|
||||
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;
|
||||
};
|
||||
|
|
|
@ -78,21 +78,9 @@ const SecurityView = () => {
|
|||
}
|
||||
}, [refresh]);
|
||||
|
||||
const passwordStrength = {
|
||||
strong: <span className={classnames(`${prefixCls}-strong`, hashId)}>强</span>,
|
||||
medium: <span className={classnames(`${prefixCls}-medium`, hashId)}>中</span>,
|
||||
weak: <span className={classnames(`${prefixCls}-weak`, hashId)}>弱</span>,
|
||||
};
|
||||
|
||||
const getData = () => [
|
||||
{
|
||||
title: '账户密码',
|
||||
description: (
|
||||
<>
|
||||
当前密码强度:
|
||||
{passwordStrength.strong}
|
||||
</>
|
||||
),
|
||||
actions: [
|
||||
<a
|
||||
key="Modify"
|
||||
|
|
|
@ -78,21 +78,10 @@ const SecurityView = () => {
|
|||
}
|
||||
}, [refresh]);
|
||||
|
||||
const passwordStrength = {
|
||||
strong: <span className={classnames(`${prefixCls}-strong`, hashId)}>强</span>,
|
||||
medium: <span className={classnames(`${prefixCls}-medium`, hashId)}>中</span>,
|
||||
weak: <span className={classnames(`${prefixCls}-weak`, hashId)}>弱</span>,
|
||||
};
|
||||
|
||||
const getData = () => [
|
||||
{
|
||||
title: '账户密码',
|
||||
description: (
|
||||
<>
|
||||
当前密码强度:
|
||||
{passwordStrength.strong}
|
||||
</>
|
||||
),
|
||||
actions: [
|
||||
<a
|
||||
key="Modify"
|
||||
|
|
Loading…
Reference in New Issue