mirror of
https://github.com/whyour/qinglong.git
synced 2025-05-24 07:16:08 +08:00
修改获取用户数据逻辑
This commit is contained in:
parent
35539a4ccc
commit
4147025406
|
@ -47,13 +47,18 @@ export default function (props: any) {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!user) {
|
||||||
|
getUser();
|
||||||
|
}
|
||||||
|
}, [props.location.pathname]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const isAuth = localStorage.getItem(config.authKey);
|
const isAuth = localStorage.getItem(config.authKey);
|
||||||
if (!isAuth) {
|
if (!isAuth) {
|
||||||
history.push('/login');
|
history.push('/login');
|
||||||
}
|
}
|
||||||
vhCheck();
|
vhCheck();
|
||||||
getUser();
|
|
||||||
|
|
||||||
// patch custome layout title as react node [object, object]
|
// patch custome layout title as react node [object, object]
|
||||||
document.title = '控制面板';
|
document.title = '控制面板';
|
||||||
|
|
|
@ -124,7 +124,12 @@ const SecuritySettings = ({ user, userChange }: any) => {
|
||||||
</Title>
|
</Title>
|
||||||
使用手机应用扫描二维码,或者输入秘钥 {twoFactorInfo?.secret}
|
使用手机应用扫描二维码,或者输入秘钥 {twoFactorInfo?.secret}
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<QRCode value={twoFactorInfo?.url} />
|
<QRCode
|
||||||
|
style={{ border: '1px solid #21262d', borderRadius: 6 }}
|
||||||
|
includeMargin={true}
|
||||||
|
size={187}
|
||||||
|
value={twoFactorInfo?.url}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<Title style={{ marginTop: 5 }} level={5}>
|
<Title style={{ marginTop: 5 }} level={5}>
|
||||||
第三步
|
第三步
|
||||||
|
|
Loading…
Reference in New Issue
Block a user