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 fetchUserInfo = async (): Promise<API.CurrentUser | undefined> => {
|
||||||
const { result, success } = await getCurrent();
|
const result = await getCurrent().catch(() => undefined);
|
||||||
if (success && result) {
|
if (result?.success && result.result) {
|
||||||
return result;
|
return result.result;
|
||||||
}
|
}
|
||||||
return undefined;
|
return undefined;
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,21 +78,9 @@ const SecurityView = () => {
|
||||||
}
|
}
|
||||||
}, [refresh]);
|
}, [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 = () => [
|
const getData = () => [
|
||||||
{
|
{
|
||||||
title: '账户密码',
|
title: '账户密码',
|
||||||
description: (
|
|
||||||
<>
|
|
||||||
当前密码强度:
|
|
||||||
{passwordStrength.strong}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
actions: [
|
actions: [
|
||||||
<a
|
<a
|
||||||
key="Modify"
|
key="Modify"
|
||||||
|
|
|
@ -78,21 +78,10 @@ const SecurityView = () => {
|
||||||
}
|
}
|
||||||
}, [refresh]);
|
}, [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 = () => [
|
const getData = () => [
|
||||||
{
|
{
|
||||||
title: '账户密码',
|
title: '账户密码',
|
||||||
description: (
|
|
||||||
<>
|
|
||||||
当前密码强度:
|
|
||||||
{passwordStrength.strong}
|
|
||||||
</>
|
|
||||||
),
|
|
||||||
actions: [
|
actions: [
|
||||||
<a
|
<a
|
||||||
key="Modify"
|
key="Modify"
|
||||||
|
|
Loading…
Reference in New Issue