{ | { | ||||
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Link to={{ pathname: `/sciencetechnologypark/detail?id=${item.id}` }} target='_blank'> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | <Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | ||||
<Space size={20}> | <Space size={20}> | ||||
<Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | <Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> |
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Col span={12}> | <Col span={12}> | ||||
<Link to={{ pathname: `/talent/information/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000' }}> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000' }}> | |||||
<Card | <Card | ||||
cover={ | cover={ | ||||
<> | <> | ||||
paddingTop: '56.25%', /* 16:9 的比例 */ | paddingTop: '56.25%', /* 16:9 的比例 */ | ||||
overflow: 'hidden' | overflow: 'hidden' | ||||
}}> | }}> | ||||
<Link to={{ pathname: '/talent/home' }} target='_blank'> | |||||
<img src={`${Imageprefix}${item.cover_img}`} style={{ | <img src={`${Imageprefix}${item.cover_img}`} style={{ | ||||
position: 'absolute', | position: 'absolute', | ||||
top: 0, | top: 0, | ||||
width: '100%', | width: '100%', | ||||
height: '100%', | height: '100%', | ||||
}} /> | }} /> | ||||
</Link> | |||||
</div> | </div> | ||||
</> | </> |
{ | { | ||||
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Link to={{ pathname: `/sciencetechnologypark/detail?id=${item.id}` }} target='_blank'> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | <Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | ||||
<Space size={20}> | <Space size={20}> | ||||
<Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | <Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> |
import { ConfigProvider, Button, Flex, Input, Space, Image, Segmented, Row, Col, Tabs, Tag, Card, Avatar, Typography, Anchor } from 'antd'; | import { ConfigProvider, Button, Flex, Input, Space, Image, Segmented, Row, Col, Tabs, Tag, Card, Avatar, Typography, Anchor } from 'antd'; | ||||
import { SearchOutlined, EllipsisOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | import { SearchOutlined, EllipsisOutlined, ArrowRightOutlined, StarOutlined } from '@ant-design/icons'; | ||||
import { useModel, connect, history, Link } from 'umi'; | import { useModel, connect, history, Link } from 'umi'; | ||||
import routes from './../../../../config/routes'; | |||||
const HomePage: React.FC = () => { | const HomePage: React.FC = () => { | ||||
const [expanded, setExpanded] = useState(false); | const [expanded, setExpanded] = useState(false); | ||||
// const [selectedTags, setSelectedTags] = useState<string[]>([routes[2].routes[0].name]); | |||||
// const handleChange = (tag: string, checked: boolean) => { | |||||
// const nextSelectedTags = checked | |||||
// ? [...selectedTags, tag] | |||||
// : selectedTags.filter((t) => t !== tag); | |||||
// console.log('You are interested in: ', nextSelectedTags); | |||||
// setSelectedTags(nextSelectedTags); | |||||
// }; | |||||
return ( | return ( | ||||
<> | <> |
paddingTop: '18%', /* 16:9 的比例 */ | paddingTop: '18%', /* 16:9 的比例 */ | ||||
overflow: 'hidden' | overflow: 'hidden' | ||||
}}> | }}> | ||||
<Link to={{ pathname: item.target_url }} target='_blank'> | |||||
<img src={Imageprefix + item.image_url} style={{ | |||||
position: 'absolute', | |||||
top: 0, | |||||
left: 0, | |||||
width: '100%', | |||||
height: '100%', | |||||
}} /> | |||||
</Link> | |||||
<img src={Imageprefix + item.image_url} style={{ | |||||
position: 'absolute', | |||||
top: 0, | |||||
left: 0, | |||||
width: '100%', | |||||
height: '100%', | |||||
}} /> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
<> | <> | ||||
<Col span={12}> | <Col span={12}> | ||||
<Link to={{ pathname: `/talent/information/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000' }}> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target="_blank" style={{ color: '#000000' }}> | |||||
<Card | <Card | ||||
cover={ | cover={ | ||||
<> | <> | ||||
paddingTop: '56.25%', /* 16:9 的比例 */ | paddingTop: '56.25%', /* 16:9 的比例 */ | ||||
overflow: 'hidden' | overflow: 'hidden' | ||||
}}> | }}> | ||||
<Link to={{ pathname: '/talent/home' }} target='_blank'> | |||||
<img src={`${Imageprefix}${item.cover_img}`} style={{ | |||||
position: 'absolute', | |||||
top: 0, | |||||
left: 0, | |||||
width: '100%', | |||||
height: '100%', | |||||
}} /> | |||||
</Link> | |||||
<img src={`${Imageprefix}${item.cover_img}`} style={{ | |||||
position: 'absolute', | |||||
top: 0, | |||||
left: 0, | |||||
width: '100%', | |||||
height: '100%', | |||||
}} /> | |||||
</div> | </div> | ||||
</> | </> |
{ | { | ||||
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Link to={{ pathname: `/sciencetechnologypark/detail?id=${item.id}` }} target='_blank'> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | <Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | ||||
<Space size={20}> | <Space size={20}> | ||||
<Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | <Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> |
{ | { | ||||
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Link to={{ pathname: `/sciencetechnologypark/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | |||||
<Link to={{ pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', color: '#000000', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | |||||
<Space size={20}> | <Space size={20}> | ||||
<Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | <Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | ||||
<h3>{item.title}</h3> | <h3>{item.title}</h3> |
list && list.length > 0 && list.map((item, index) => ( | list && list.length > 0 && list.map((item, index) => ( | ||||
<> | <> | ||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | |||||
<Space size={20}> | |||||
<Image src={`${Imageprefix}${item.image_url}`} width={100} height={100}></Image> | |||||
<h3>{item.title}</h3> | |||||
</Space> | |||||
<Space size={20}> | |||||
<div> | |||||
{item.updated_at} | |||||
</div> | |||||
<RightOutlined /> | |||||
</Space> | |||||
</Flex> | |||||
<Link to={{pathname: `/sciencetechnologypark/information/detail?id=${item.id}` }} target='_blank'> | |||||
<Flex justify='space-between' align='center' style={{ width: '100%', padding: '16px', color: '#000000', background: '#ffffff', borderRadius: 8, cursor: 'pointer' }}> | |||||
<Space size={20}> | |||||
<Image src={`${Imageprefix}${item.cover_img}`} width={100} height={100}></Image> | |||||
<h3>{item.title}</h3> | |||||
</Space> | |||||
<Space size={20}> | |||||
<div> | |||||
{item.updated_at} | |||||
</div> | |||||
<RightOutlined /> | |||||
</Space> | |||||
</Flex> | |||||
</Link> | |||||
</> | </> | ||||
)) | )) | ||||
} | } |