修改友情链接样式;增加权限认证
This commit is contained in:
@ -71,6 +71,7 @@ export default [
|
||||
name: 'helpQuestion',
|
||||
path: '/help/helpQuestion',
|
||||
component: '@/pages/help/helpQuestion',
|
||||
wrappers: ['@/wrappers/auth'],
|
||||
},
|
||||
{
|
||||
path: '/register',
|
||||
|
@ -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) => ({
|
||||
|
@ -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;
|
Reference in New Issue
Block a user