管理端个人中心

pull/65/head
awenes 2023-10-06 18:43:59 +08:00
parent 4fa0746bfb
commit c33bc6f2f3
3 changed files with 3 additions and 26 deletions

View File

@ -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;
};

View File

@ -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"

View File

@ -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"