add data
This commit is contained in:
parent
2b29899fd9
commit
0d2dfd1cac
|
|
@ -31,7 +31,7 @@ function Banner(props) {
|
|||
|
||||
useEffect(()=>{
|
||||
setDocumentTitle(mainInfo?.name || "第八届CCF开源创新大赛");
|
||||
},[])
|
||||
},[location.pathname])
|
||||
return(
|
||||
<div>
|
||||
<div className={isMain()?"gameheader":"fixedHeader"}>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 998 KiB After Width: | Height: | Size: 531 KiB |
|
|
@ -15,13 +15,14 @@ import { throttle } from '@/utils/mettingUtil';
|
|||
function Information() {
|
||||
const [ isSpin , setIsSpin ] = useState(false);
|
||||
const [ informationList , setInformationList ] = useState([]);
|
||||
const [ allInformations , setAllInformations ] = useState([]);
|
||||
const { dirList } = useModel('2026Config');
|
||||
const [ tabKey , setTabKey ] = useState(0);
|
||||
const [ positionNum ,setPositionNum ] = useState([]);
|
||||
const[ title ,setTitle] = useState(undefined);
|
||||
const[ searchTitle ,setSearchTitle] = useState(undefined);
|
||||
const [ showNews , setShowNews] = useState(false);
|
||||
|
||||
|
||||
function saishiNewActive(){
|
||||
const observer = new IntersectionObserver((entries) => {
|
||||
entries.forEach(entry => {
|
||||
|
|
@ -94,6 +95,9 @@ function Information() {
|
|||
totalList[e.name] = e.list
|
||||
})
|
||||
setInformationList(totalList);
|
||||
let mergedArr = [...new Set([...totalList.guide, ...totalList.notice,...totalList.forum])]
|
||||
setAllInformations(mergedArr.filter(i=>i.isHomepage === "1"));
|
||||
|
||||
setIsSpin(false);
|
||||
saishiNewActive();//设置赛事新闻的动画效果
|
||||
})
|
||||
|
|
@ -137,12 +141,12 @@ console.log(information,dirList);
|
|||
<div className="part bannerAll">
|
||||
<img src={Infoleftbanner} width={800} style={{marginRight:"90px"}}/>
|
||||
{
|
||||
informationList["guide"] && informationList["guide"].length > 0 ?
|
||||
allInformations && allInformations.length > 0 ?
|
||||
<div className='activeList'>
|
||||
{
|
||||
informationList["guide"].map((e,k)=>{
|
||||
allInformations.map((e,k)=>{
|
||||
return(
|
||||
<div className='activeCard'>
|
||||
k < 4 && <div className='activeCard' key={k}>
|
||||
<Link className='name task-hide' to={ `/competitions/2026/information/${ e.id }` }>{e.name}</Link>
|
||||
<span className='time'>{e.publishTime}</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@
|
|||
}
|
||||
.time{
|
||||
margin-left: auto;
|
||||
color:#6f728c;
|
||||
}
|
||||
&:nth-child(2n){
|
||||
margin-left: 0px;
|
||||
|
|
|
|||
Loading…
Reference in New Issue