管理端个人中心

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

View File

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

View File

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