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

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

@ -71,6 +71,7 @@ export default [
name: 'helpQuestion', name: 'helpQuestion',
path: '/help/helpQuestion', path: '/help/helpQuestion',
component: '@/pages/help/helpQuestion', component: '@/pages/help/helpQuestion',
wrappers: ['@/wrappers/auth'],
}, },
{ {
path: '/register', path: '/register',

View File

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