feat(ui): show available models for air theme (#1595)
* feat(ui): air 主题显示可用模型 * chore: 改为全角括号
This commit is contained in:
parent
ec6ad24810
commit
273be55797
@ -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/available_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();
|
||||||
@ -344,7 +344,7 @@ const PersonalSetting = () => {
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography.Title heading={6}>调用信息</Typography.Title>
|
<Typography.Title heading={6}>调用信息</Typography.Title>
|
||||||
{/* <Typography.Title heading={6}>可用模型</Typography.Title>
|
<p>可用模型(可点击复制)</p>
|
||||||
<div style={{ marginTop: 10 }}>
|
<div style={{ marginTop: 10 }}>
|
||||||
<Space wrap>
|
<Space wrap>
|
||||||
{models.map((model) => (
|
{models.map((model) => (
|
||||||
@ -355,7 +355,7 @@ const PersonalSetting = () => {
|
|||||||
</Tag>
|
</Tag>
|
||||||
))}
|
))}
|
||||||
</Space>
|
</Space>
|
||||||
</div> */}
|
</div>
|
||||||
</Card>
|
</Card>
|
||||||
{/* <Card
|
{/* <Card
|
||||||
footer={
|
footer={
|
||||||
|
Loading…
Reference in New Issue
Block a user