feat: 完成个人设置界面
This commit is contained in:
parent
8d8792a283
commit
27b75d79b8
@ -47,7 +47,7 @@ const PersonalSetting = () => {
|
|||||||
const [countdown, setCountdown] = useState(30);
|
const [countdown, setCountdown] = useState(30);
|
||||||
const [affLink, setAffLink] = useState('');
|
const [affLink, setAffLink] = useState('');
|
||||||
const [systemToken, setSystemToken] = useState('');
|
const [systemToken, setSystemToken] = useState('');
|
||||||
const [models, setModels] = useState([]);
|
// const [models, setModels] = useState([]);
|
||||||
const [openTransfer, setOpenTransfer] = useState(false);
|
const [openTransfer, setOpenTransfer] = useState(false);
|
||||||
const [transferAmount, setTransferAmount] = useState(0);
|
const [transferAmount, setTransferAmount] = useState(0);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ const PersonalSetting = () => {
|
|||||||
console.log(userState);
|
console.log(userState);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
loadModels().then();
|
// loadModels().then();
|
||||||
getAffLink().then();
|
getAffLink().then();
|
||||||
setTransferAmount(getQuotaPerUnit());
|
setTransferAmount(getQuotaPerUnit());
|
||||||
}, []);
|
}, []);
|
||||||
@ -127,16 +127,16 @@ const PersonalSetting = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const loadModels = async () => {
|
// const loadModels = async () => {
|
||||||
let res = await API.get(`/api/user/models`);
|
// let res = await API.get(`/api/user/models`);
|
||||||
const { success, message, data } = res.data;
|
// const { success, message, data } = res.data;
|
||||||
if (success) {
|
// if (success) {
|
||||||
setModels(data);
|
// setModels(data);
|
||||||
console.log(data);
|
// console.log(data);
|
||||||
} else {
|
// } else {
|
||||||
showError(message);
|
// showError(message);
|
||||||
}
|
// }
|
||||||
};
|
// };
|
||||||
|
|
||||||
const handleAffLinkClick = async (e) => {
|
const handleAffLinkClick = async (e) => {
|
||||||
e.target.select();
|
e.target.select();
|
||||||
@ -343,7 +343,8 @@ const PersonalSetting = () => {
|
|||||||
</Descriptions>
|
</Descriptions>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography.Title heading={6}>可用模型</Typography.Title>
|
<Typography.Title heading={6}>调用信息</Typography.Title>
|
||||||
|
{/* <Typography.Title heading={6}>可用模型</Typography.Title>
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
{models.map((model) => (
|
{models.map((model) => (
|
||||||
@ -354,10 +355,9 @@ const PersonalSetting = () => {
|
|||||||
</Tag>
|
</Tag>
|
||||||
))}
|
))}
|
||||||
</Space>
|
</Space>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
</Card>
|
</Card>
|
||||||
<Card
|
{/* <Card
|
||||||
footer={
|
footer={
|
||||||
<div>
|
<div>
|
||||||
<Typography.Text>邀请链接</Typography.Text>
|
<Typography.Text>邀请链接</Typography.Text>
|
||||||
@ -387,6 +387,15 @@ const PersonalSetting = () => {
|
|||||||
<Descriptions.Item itemKey="邀请人数">{userState?.user?.aff_count}</Descriptions.Item>
|
<Descriptions.Item itemKey="邀请人数">{userState?.user?.aff_count}</Descriptions.Item>
|
||||||
</Descriptions>
|
</Descriptions>
|
||||||
</div>
|
</div>
|
||||||
|
</Card> */}
|
||||||
|
<Card>
|
||||||
|
<Typography.Title heading={6}>邀请链接</Typography.Title>
|
||||||
|
<Input
|
||||||
|
style={{ marginTop: 10 }}
|
||||||
|
value={affLink}
|
||||||
|
onClick={handleAffLinkClick}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
</Card>
|
</Card>
|
||||||
<Card>
|
<Card>
|
||||||
<Typography.Title heading={6}>个人信息</Typography.Title>
|
<Typography.Title heading={6}>个人信息</Typography.Title>
|
||||||
@ -450,7 +459,7 @@ const PersonalSetting = () => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style={{ marginTop: 10 }}>
|
{/* <div style={{ marginTop: 10 }}>
|
||||||
<Typography.Text strong>Telegram</Typography.Text>
|
<Typography.Text strong>Telegram</Typography.Text>
|
||||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||||
<div>
|
<div>
|
||||||
@ -468,7 +477,7 @@ const PersonalSetting = () => {
|
|||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> */}
|
||||||
|
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<Space>
|
<Space>
|
||||||
|
Loading…
Reference in New Issue
Block a user