From aeab944ffae9516821792de0e56263b5584d5f0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= Date: Fri, 29 May 2026 13:51:22 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B6=85=E7=AE=97=E4=B8=93?= =?UTF-8?q?=E5=8C=BA=E9=A1=B5=E9=9D=A2=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Information/Component/memberList.jsx | 4 +- src/forge/Information/Pages/custom/index.less | 3 + .../Pages/homepage/component/newsByNSCC.jsx | 17 +- .../homepage/component/projectByNSCC.jsx | 11 +- .../Pages/homepage/component/sourceByNSCC.jsx | 4 +- .../Information/Pages/homepage/index.scss | 5 + src/forge/Information/Pages/homepage/nscc.jsx | 18 +- .../project/cateList/CategorySection.jsx | 8 +- .../Pages/project/cateList/index.jsx | 156 +++++++++--------- .../Pages/project/cateList/index.scss | 5 + src/forge/Information/Pages/source.jsx | 10 +- src/forge/Information/index.scss | 24 ++- src/forge/Information/indexZone1.scss | 4 + 13 files changed, 158 insertions(+), 111 deletions(-) diff --git a/src/forge/Information/Component/memberList.jsx b/src/forge/Information/Component/memberList.jsx index 5d5667ea2..71c553325 100644 --- a/src/forge/Information/Component/memberList.jsx +++ b/src/forge/Information/Component/memberList.jsx @@ -45,9 +45,9 @@ function Member(props) { { temp === tempEnum.zone1 &&
{i.typeName}
} -
+ {i.typeIntroduction &&

{i.typeIntroduction}

-
+
} {i.isSearch && searchFunc(e,k)} diff --git a/src/forge/Information/Pages/custom/index.less b/src/forge/Information/Pages/custom/index.less index 08ad5e3df..dd08e4b00 100644 --- a/src/forge/Information/Pages/custom/index.less +++ b/src/forge/Information/Pages/custom/index.less @@ -64,6 +64,9 @@ } .card_ul{ padding-bottom: 30px; + max-height: 855px; + overflow-y: auto; + .card_u_li{ padding:25px 40px 0px; cursor: pointer; diff --git a/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx b/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx index 0b7027a18..4ac59a49f 100644 --- a/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/newsByNSCC.jsx @@ -21,19 +21,20 @@ function News(props) { const newsSectionRef = useRef(null); useEffect(() => { + let hasAnimated = false; // 标记动画是否已触发 const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { - if (entry.isIntersecting) { - // 元素进入视口时先移除再添加类,确保动画重新触发 + // 只在第一次进入视口时触发动画 + if (entry.isIntersecting && !hasAnimated) { + hasAnimated = true; entry.target.classList.remove('bg-zoom-in'); - // 强制重排 void entry.target.offsetWidth; entry.target.classList.add('bg-zoom-in'); } }); }, - { + { threshold: 0.2, rootMargin: '0px 0px -50px 0px' } @@ -102,9 +103,11 @@ function News(props) { } {docListByFirstDir.length > 1 &&
{docListByFirstDir.slice(1).map(item=>{ - return
- {item.name} - {moment(item.publishTime).format('YYYY-MM-DD')} + return
+
+ {item.name} + {moment(item.publishTime).format('YYYY-MM-DD')} +
})} diff --git a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx index 05ac19eb7..5e274e5f1 100644 --- a/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/projectByNSCC.jsx @@ -62,20 +62,21 @@ function Project({ data }) { const newsSectionRef = useRef(null); useEffect(() => { + let hasAnimated = false; // 标记动画是否已触发 const observer = new IntersectionObserver( (entries) => { entries.forEach((entry) => { - if (entry.isIntersecting) { - // 元素进入视口时先移除再添加类,确保动画重新触发 + // 只在第一次进入视口时触发动画 + if (entry.isIntersecting && !hasAnimated) { + hasAnimated = true; entry.target.classList.remove('project_NSCC_tra'); - // 强制重排 void entry.target.offsetWidth; entry.target.classList.add('project_NSCC_tra'); } }); }, - { - threshold: 0.4, + { + threshold: 0.2, rootMargin: '0px 0px -50px 0px' } ); diff --git a/src/forge/Information/Pages/homepage/component/sourceByNSCC.jsx b/src/forge/Information/Pages/homepage/component/sourceByNSCC.jsx index 18dca30d4..bf9e2d621 100644 --- a/src/forge/Information/Pages/homepage/component/sourceByNSCC.jsx +++ b/src/forge/Information/Pages/homepage/component/sourceByNSCC.jsx @@ -43,7 +43,7 @@ function Source({data}) { return

{homepageResourceTitle}

-
+
{zoneList.slice(0,4).map((item, index)=>{ return
{setChooseZoneId(item.id);}} style={{flex: '25%'}}> @@ -76,7 +76,7 @@ function Source({data}) {
})}
- {setPage(page)}} className='center mt30'/> + {setPage(page)}} className='center mt36 black-pagination'/>
{!isSpin && !sourceList.length && }
diff --git a/src/forge/Information/Pages/homepage/index.scss b/src/forge/Information/Pages/homepage/index.scss index 4b3bbacf6..c6109cfaa 100644 --- a/src/forge/Information/Pages/homepage/index.scss +++ b/src/forge/Information/Pages/homepage/index.scss @@ -49,6 +49,10 @@ width: 1200px; margin:0px auto; } +.width1400{ + width: 1400px; + margin:0px auto; +} .width1600{ width: 1600px!important; margin:0px auto; @@ -791,6 +795,7 @@ background-size: 100% 100%; background-repeat: no-repeat; background-position: center center; + border-radius: 40px; &.bg-zoom-in { background-size: 80% 70%; animation: bgZoomIn 0.5s ease-out forwards; diff --git a/src/forge/Information/Pages/homepage/nscc.jsx b/src/forge/Information/Pages/homepage/nscc.jsx index 2b8d36fb6..81771e154 100644 --- a/src/forge/Information/Pages/homepage/nscc.jsx +++ b/src/forge/Information/Pages/homepage/nscc.jsx @@ -22,6 +22,18 @@ function HeaderPageUos(props) { specialProjectCount: "重点项目", } + // 标题出场效果组件 + const nsccTitle = (title, delay=0.1, classname="") => { + if (!title) return null; + return
+ {title.split("").map((char, index) => ( + + {char} + + ))} +
+ } + const { data } = props; const { id, firstTitle, homepageSpecialProjectTitle, homepageCmsTitle, homepageProjectTitle, homepageResourceTitle, homepageMemberTitle } = data || {}; const [data1, setData1] = useState({}); @@ -95,10 +107,8 @@ function HeaderPageUos(props) { }
-
- {firstTitle} -
-
+ {nsccTitle(firstTitle, 0.1, "font-bd font-36 align")} +
{Object.keys(label).map(item => { return
diff --git a/src/forge/Information/Pages/project/cateList/CategorySection.jsx b/src/forge/Information/Pages/project/cateList/CategorySection.jsx index a71e5706c..aef937b47 100644 --- a/src/forge/Information/Pages/project/cateList/CategorySection.jsx +++ b/src/forge/Information/Pages/project/cateList/CategorySection.jsx @@ -120,11 +120,11 @@ function CategorySection({ category, index, zoneId, nsccTitle }) {
)} {layoutType === 'layout-3' && ( -
+
{parter_title()}
- {renderProjects(true)} + {renderProjects(true, [0,6])}
@@ -145,7 +145,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) {
- {renderProjects(true)} + {renderProjects(true, [0,4])}
} @@ -160,7 +160,7 @@ function CategorySection({ category, index, zoneId, nsccTitle }) { {/* 查看更多 */}
- {renderProjects(false)} + {renderProjects(false, [0,6])}
} diff --git a/src/forge/Information/Pages/project/cateList/index.jsx b/src/forge/Information/Pages/project/cateList/index.jsx index be5d227d4..d0be27746 100644 --- a/src/forge/Information/Pages/project/cateList/index.jsx +++ b/src/forge/Information/Pages/project/cateList/index.jsx @@ -29,70 +29,73 @@ function ProjectCateList(props) { } },[typeList]) - // 滚动监听元素(放大)位置增加动态效果 - function InitScaleObs(){ - const eles = document.getElementsByClassName("needScale"); - const observer = new IntersectionObserver((entries) => { - const entry = entries[0]; - // 如果元素进入视口 - let name = entries[0].target.className; - if (entry.isIntersecting) { - entries[0].target.className = name + ` fadeScale`; - }else{ - entries[0].target.className = name.replaceAll(" fadeScale",""); - } - }, { - threshold: 0.3 //露出 30% 时触发 - }); - if(eles && eles.length> 0){ - for(var i =0;i { - const entry = entries[0]; - // 如果元素进入视口 - let name = entries[0].target.className; - if (entry.isIntersecting) { - entries[0].target.className = name + ` fadeUp`; - }else{ - entries[0].target.className = name.replaceAll(" fadeUp",""); - } - }, { - threshold: 0.3 //露出 30% 时触发 - }); - if(eles && eles.length> 0){ - for(var i =0;i { + entries.forEach(entry => { + // 只触发一次,进入视口后不再移除 class + if (entry.isIntersecting) { + let name = entry.target.className; + if (!name.includes(' fadeScale')) { + entry.target.className = name + ` fadeScale`; + } + } + }); + }, { + threshold: 0.3 //露出 30% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;i { + entries.forEach(entry => { + // 只触发一次,进入视口后不再移除 class + if (entry.isIntersecting) { + let name = entry.target.className; + if (!name.includes(' fadeUp')) { + entry.target.className = name + ` fadeUp`; + } + } + }); + }, { + threshold: 0.3 //露出 30% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;i { - const entry = entries[0]; - // 如果元素进入视口 - let name = entries[0].target.className; - if (entry.isIntersecting) { - entries[0].target.className = name + ` fadeInChar`; - }else{ - entries[0].target.className = name.replaceAll(" fadeInChar",""); - } - }, { - threshold: 0.1 //露出 30% 时触发 - }); - if(eles && eles.length> 0){ - for(var i =0;i { + entries.forEach(entry => { + // 只触发一次,进入视口后不再移除 class + if (entry.isIntersecting) { + let name = entry.target.className; + if (!name.includes(' fadeInChar')) { + entry.target.className = name + ` fadeInChar`; + } + } + }); + }, { + threshold: 0.1 //露出 10% 时触发 + }); + if(eles && eles.length> 0){ + for(var i =0;isetVisible(false)} role={role && role.role} onFresh={()=>{getTypeList();}}/> {/* 数据统计部分 */}
- {nsccTitle("数聚开源力量,实时见证开源生态的每一次进化", 0.1, "center pt80")} + {nsccTitle("数聚开源力量,实时见证开源生态的每一次进化", 0.1, "center pt80 fadeInChar")}
{statsData.map((stat, index) => ( @@ -210,20 +213,17 @@ function ProjectCateList(props) { {/* 分类介绍部分 */} - {typeList && !!typeList.length && ( -
- {typeList.map((item, index) => ( - - ))} -
- )} +
+ {typeList && !!typeList.length && typeList.map((item, index) => ( + + ))} +
{/* 底部区域 */} diff --git a/src/forge/Information/Pages/project/cateList/index.scss b/src/forge/Information/Pages/project/cateList/index.scss index fbf428a7f..e607ce9bb 100644 --- a/src/forge/Information/Pages/project/cateList/index.scss +++ b/src/forge/Information/Pages/project/cateList/index.scss @@ -113,6 +113,11 @@ background-position: 100% 0px; background-size: 200% 100%; padding: 25px; + max-height:652px; + overflow-y: auto; + &::-webkit-scrollbar{ + display: none; + } } .cate_project_list_box{ display: grid; diff --git a/src/forge/Information/Pages/source.jsx b/src/forge/Information/Pages/source.jsx index 89855b0ab..3a09b6692 100644 --- a/src/forge/Information/Pages/source.jsx +++ b/src/forge/Information/Pages/source.jsx @@ -24,7 +24,7 @@ function Source(props){ const [ total , setTotal ] = useState(0); const [ search , setSearch ] = useState(undefined); const [ isSpin , setIsSpin ] = useState(true); - const limit = 21; + const limit = 20; const { id , temp, history, role, sectionResourceTitle } = props; const isNSCC = deptId === "NSCC"; @@ -100,7 +100,13 @@ function Source(props){ return(
-

{sectionResourceTitle}{isNSCC && · 应用集市}

+

+ {sectionResourceTitle} + {isNSCC && + · + 应用集市 + } +

{isNSCC ?
猜你想问 diff --git a/src/forge/Information/index.scss b/src/forge/Information/index.scss index d40a72d0b..f93633378 100644 --- a/src/forge/Information/index.scss +++ b/src/forge/Information/index.scss @@ -266,9 +266,9 @@ bottom: 0px; background-color:rgba(54, 66, 101, .5); height: 88px; + text-align: center; .ant-menu{ - width: 1200px; - margin:0px auto; + display: inline-block; background-color: transparent; height: 100%; font-size: 16px; @@ -279,7 +279,7 @@ line-height: 88px; border-bottom: none!important; padding:0px ; - margin-right: 80px!important; + margin: 0 40px !important; img{ margin-right: 10px; } @@ -302,13 +302,16 @@ } } &.bannerByNSCC{ + .bannerMenus .ant-menu li{ + margin: 0 65px !important; + } + .zone_content{ + width: 1400px; + } .main_t_nscc{ line-height: normal; width: max-content; color: rgba(255, 255, 255, 0.9); - // border-bottom: 1px solid transparent; - // border-image: linear-gradient(135deg,#72f4fc 0%,#4ac0f3 39.2%,#468bff 100%) 1; - // margin-bottom: -20px !important; } .title_n_1{ font-size: 40px; @@ -2245,7 +2248,8 @@ } } .searchByNSCC{ - flex: 1; + flex: 0.8; + margin: 0 auto; border: 1px solid transparent; border-radius: 12px; background-clip: padding-box, border-box; @@ -2321,9 +2325,15 @@ .fadeUp{ opacity: 0; + transform: translateY(100px); animation-delay: .2s; animation: fadeUpZone 0.8s ease-out forwards; } +.needFadeUp{ + opacity: 0; + transform: translateY(100px); + transition: opacity 0.6s ease, transform 0.6s ease; +} .needScale{ transform: scale(.8); transition: 1s; diff --git a/src/forge/Information/indexZone1.scss b/src/forge/Information/indexZone1.scss index 71e7f3df4..242b1fdbf 100644 --- a/src/forge/Information/indexZone1.scss +++ b/src/forge/Information/indexZone1.scss @@ -1,6 +1,10 @@ @import './theme.scss'; +.width1400{ + width: 1400px; + margin:0px auto; +} .width1600{ width: 1600px!important; margin:0px auto;