修改友情链接样式;增加权限认证

This commit is contained in:
linxd
2025-07-14 13:44:54 +08:00
parent abdafba5d9
commit baedd70f53
3 changed files with 2 additions and 35 deletions

View File

@ -7,7 +7,6 @@ const Footer: React.FC = () => {
useEffect(() => {
getCoscoPortalsLinksClassification().then((res) => {
setLinks(res.data);
console.log(res.data);
});
}, []);
return (
@ -20,7 +19,7 @@ const Footer: React.FC = () => {
<>
{link.links.length > 0 && (
<Select
style={{ width: 200 }}
style={{ width: 200, marginRight: 10 }}
size="small"
placeholder={link.name}
options={link.links.map((item) => ({

View File

@ -1,33 +0,0 @@
import React from 'react';
import { Select } from 'antd';
const LinkComponent: React.FC<{ links: API.CoscoPortalsLinksClassification }> = ({ links }) => {
console.log(links);
return (
<div className="link">
<div></div>
<div className="flex">
{links.map((link) => (
<>
{link.links.length > 0 && (
<Select
style={{ width: 200 }}
size="small"
placeholder={link.name}
options={link.links.map((item) => ({
label: item.name,
value: item.url,
}))}
onChange={(value) => {
window.open(value as string, '_blank');
}}
/>
)}
</>
))}
</div>
</div>
);
};
export default LinkComponent;