From 2760e71668fe2dff0fcc2de91cc1be29a6d7a8d7 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 21 Aug 2024 16:50:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E8=8A=AF=E9=99=A2=E9=A6=96=E9=A1=B5?= =?UTF-8?q?=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Information/Pages/headerPageZone1.jsx | 528 +++++++++++++----- src/forge/Information/Pages/main.jsx | 11 +- src/forge/Information/api.js | 24 + src/forge/Information/img/cbg2.png | Bin 6528 -> 6371 bytes src/forge/Information/img/communicateBg.png | Bin 155277 -> 308928 bytes src/forge/Information/img/zone1/EDA.png | Bin 0 -> 807 bytes src/forge/Information/img/zone1/chain.png | Bin 0 -> 924 bytes src/forge/Information/img/zone1/core.png | Bin 0 -> 6204 bytes src/forge/Information/img/zone1/fu.png | Bin 0 -> 528 bytes .../Information/img/zone1/jiantouwhite.png | Bin 0 -> 235 bytes src/forge/Information/img/zone1/last.png | Bin 0 -> 1609975 bytes src/forge/Information/img/zone1/line.png | Bin 0 -> 348594 bytes src/forge/Information/img/zone1/phone.png | Bin 0 -> 504 bytes src/forge/Information/img/zone1/sys.png | Bin 0 -> 512838 bytes src/forge/Information/img/zone1/system.png | Bin 0 -> 2505 bytes src/forge/Information/img/zone1/team1.png | Bin 0 -> 6291 bytes src/forge/Information/img/zone1/team2.png | Bin 0 -> 9103 bytes src/forge/Information/img/zone1/team3.png | Bin 0 -> 6437 bytes src/forge/Information/img/zone1/team4.png | Bin 0 -> 6032 bytes src/forge/Information/img/zone1/window.png | Bin 0 -> 588 bytes src/forge/Information/img/zone1/xinpian.png | Bin 0 -> 1024 bytes src/forge/Information/img/zone1/zhao.png | Bin 0 -> 1468 bytes src/forge/Information/index.scss | 21 +- src/forge/Information/indexZone1.scss | 483 +++++++++++++++- 24 files changed, 903 insertions(+), 164 deletions(-) create mode 100644 src/forge/Information/img/zone1/EDA.png create mode 100644 src/forge/Information/img/zone1/chain.png create mode 100644 src/forge/Information/img/zone1/core.png create mode 100644 src/forge/Information/img/zone1/fu.png create mode 100644 src/forge/Information/img/zone1/jiantouwhite.png create mode 100644 src/forge/Information/img/zone1/last.png create mode 100644 src/forge/Information/img/zone1/line.png create mode 100644 src/forge/Information/img/zone1/phone.png create mode 100644 src/forge/Information/img/zone1/sys.png create mode 100644 src/forge/Information/img/zone1/system.png create mode 100644 src/forge/Information/img/zone1/team1.png create mode 100644 src/forge/Information/img/zone1/team2.png create mode 100644 src/forge/Information/img/zone1/team3.png create mode 100644 src/forge/Information/img/zone1/team4.png create mode 100644 src/forge/Information/img/zone1/window.png create mode 100644 src/forge/Information/img/zone1/xinpian.png create mode 100644 src/forge/Information/img/zone1/zhao.png diff --git a/src/forge/Information/Pages/headerPageZone1.jsx b/src/forge/Information/Pages/headerPageZone1.jsx index c1893c61c..92735fa8e 100644 --- a/src/forge/Information/Pages/headerPageZone1.jsx +++ b/src/forge/Information/Pages/headerPageZone1.jsx @@ -1,8 +1,22 @@ import React,{ useState, useEffect } from 'react'; import { httpUrl } from '../fetch'; - -import img1 from '../img/img1.png'; -import img2 from '../img/img2.png'; +import { Button , Anchor } from 'antd'; +import { Link } from 'react-router-dom'; +import arrowWhite from '../img/zone1/jiantouwhite.png'; +import xinpian from '../img/zone1/xinpian.png'; +import system from '../img/zone1/system.png'; +import chain from '../img/zone1/chain.png'; +import eda from '../img/zone1/EDA.png'; +import fu from '../img/zone1/fu.png'; +import team1 from '../img/zone1/team1.png'; +import team2 from '../img/zone1/team2.png'; +import team3 from '../img/zone1/team3.png'; +import team4 from '../img/zone1/team4.png'; +import window from '../img/zone1/window.png'; +import phone from '../img/zone1/phone.png'; +import line from '../img/zone1/line.png'; +import zhao from '../img/zone1/zhao.png'; +import sys from '../img/zone1/sys.png'; import vision0 from '../img/vision0.png'; import vision1 from '../img/vision1.png'; import vision2 from '../img/vision2.png'; @@ -14,20 +28,19 @@ import intro4 from '../img/intro4.png'; import guideArrow from '../img/guideArrow1.png'; import ra from '../img/ra.png' import title from '../img/title.png' -import { Link } from 'react-router-dom'; -import shijian from '../img/shijian.png'; -import Nodata from '../../Nodata'; -import Projects from '../Component/projects'; -import Contributor from '../Component/contributor'; import Partner from '../Component/partner'; -import '../indexZone1.scss' -import { getProjectsLists, getPartnerList, getHomePageList, gethomePageDocList } from '../api' +import '../indexZone1.scss'; +import { getProjectsLists, getPartnerList, getHomePageList, gethomePageDocList , getDocList , getSubDocList } from '../api' + function HeaderPage(props){ - const [ projectList , setProjectList ] = useState(undefined); + // const [ projectList , setProjectList ] = useState(undefined); const [ personList , setPersonList ] = useState(undefined); - const [ newsList, setNewsList ] = useState(undefined); + // const [ newsList, setNewsList ] = useState(undefined); const [ partnerList, setParterList ] = useState(undefined); + const [ recruitId, setRecruitId ] = useState(undefined); + const [ recruitList, setRecruitList ] = useState(undefined); + const [ showAnchor, setShowAnchor ] = useState(false); const { deptId } = props.match.params; const { data, id, temp, history } = props; @@ -52,22 +65,43 @@ function HeaderPage(props){ { type: '计划四', plan: '香山贡献参与' } ] + const introDetail = [ { title: '能力阶梯', icon: intro1, desc: '成长体系按照开发者从⼊门到进阶再到⾹⼭顶级项⽬设⽴了⽤户能⼒提升的阶梯式真实项⽬' }, { title: '贡献分级', icon: intro2, desc: '所有开源项⽬全部为开芯院开源开放的真实项⽬,开发者参与开源项⽬的所有贡献将作为成长等级、知产授权、加⼊⾼级别项⽬(悬赏、获得offer等)、成为核⼼贡献者的参与 依据' }, { title: '成长认证', icon: intro3, desc: '开发者可以通过完成开源项⽬对应的任务,赢取对应能⼒成长认证,开源项⽬对应的⾼级任务将获得对应等级L2或⾼级别的知识产权授权,同时解锁下⼀级别成长任务' }, { title: '顶级认证', icon: intro4, desc: '参与顶级项⽬“⾹⼭”的贡献者,将获得中国科学院计算技术研究所副所长、研究员,北京开源芯⽚研究院⾸席科学家,RISC-V国际基⾦会理事会成员包云岗签名贡献者证书' } ] + useEffect(()=>{ + if(id){ + // getProjectList(); + // getNewsList(); + getPersonList(); + getPartner(); + getHomeDocList(); + } + },[id]) useEffect(()=>{ - if(id){ - getProjectList(); - getNewsList(); - getPersonList(); - getPartner(); + document.addEventListener("scroll", scroll); + if(recruitId){ + getDocById(recruitId) } - },[id]) + return () => { + document.removeEventListener("scroll", scroll); + }; + },[recruitId]) + + + const scroll = () =>{ + let sTop = document.documentElement.scrollTop; + if(sTop >= 2000){ + setShowAnchor(true); + }else{ + setShowAnchor(false); + } + } function getPersonList(){ getHomePageList(id).then(result=>{ @@ -76,25 +110,46 @@ function HeaderPage(props){ } }).catch(error=>{}) } - - function getNewsList(){ - gethomePageDocList(id).then(result=>{ - if(result){ - setNewsList(result.data.rows); - } - }).catch(error=>{}) - } - function getProjectList(){ - getProjectsLists(id,{ isHomepage:1 }).then(result=>{ - if(result){ - if (result.data.rows.length < 3) { - setProjectList(result.data.rows) - } else { - setProjectList([...result.data.rows, {}]); + // 获取所有栏目,找到招聘专栏拿到其id + function getHomeDocList(){ + getDocList(id).then(result=>{ + if(result && result.data.rows){ + let rows = result.data.rows; + let filterRow = rows ? rows.filter(i=>i.name === "招聘专栏") : undefined; + if(filterRow && filterRow.length>0){ + setRecruitId(filterRow[0].id); } } - }).catch(error=>{}) + }) } + // 根据招聘专栏的id获取其栏目下的招聘文章 + function getDocById(recruitId){ + getSubDocList(recruitId,{pageSize:4,pageNum:1,auditStatus:1}).then(result=>{ + if(result && result.data.rows){ + let rows = result.data.rows; + setRecruitList(rows); + } + }) + } + + // function getNewsList(){ + // gethomePageDocList(id).then(result=>{ + // if(result){ + // setNewsList(result.data.rows); + // } + // }).catch(error=>{}) + // } + // function getProjectList(){ + // getProjectsLists(id,{ isHomepage:1 }).then(result=>{ + // if(result){ + // if (result.data.rows.length < 3) { + // setProjectList(result.data.rows) + // } else { + // setProjectList([...result.data.rows, {}]); + // } + // } + // }).catch(error=>{}) + // } function getPartner(){ getPartnerList(id).then(result => { @@ -115,8 +170,220 @@ function HeaderPage(props){ }) } return( -
芯片设计创新链
+欢迎开源芯片企业、高校、开发者、学生参与社区
开源芯片技术体系
+构建开源芯片生态
开源芯片的三个层次
开源芯片社区OChip宗旨及愿景
+{ i.title }
+{ i.content }
+开源芯⽚⽤户成长体系介绍
*/} +参与开源芯⽚项⽬的开发者需要签署开源贡献者协议
+建议开发者按照开源项⽬成长路径进⾏参与,稳步提升能⼒,降低跳级参与带来的挑战
+ {/*{ i.plan }
+ { k % 2 === 0 && } + +
+
+ { i.title }
+
{ i.desc }
+宗旨及愿景
-{ i.title }
-{ i.content }
-{ data.homepageProjectTitle }
{ data.homepageMemberTitle }
-参与社区
-成为社区成员,尽情发挥您的创意
{ i.level }
-{ i.todo }
- -开源芯⽚⽤户成长体系介绍
*/} -参与开源芯⽚项⽬的开发者需要签署开源贡献者协议
-建议开发者按照开源项⽬成长路径进⾏参与,稳步提升能⼒,降低跳级参与带来的挑战
-招聘专栏
+ 查看全部 +“职”等你来
——企业招聘专栏
+在这里,我们汇聚了开源芯片的精英企业,为您带来最前沿的就业机会。加入我们,让梦想照进现实,共同开启职业生涯的新篇章!
+{i.name}
+{i.summary}
+ 查看详情{ data.homepagePartnersTitle }
+核心企业CORE ENTERPRISE
+核心贡献者CORE CONTRIBUTORS
+{item.name}
+{item.introduction || "暂无简介"}
+开发者加入社区DEVELOPERS INCOMING THE COMMUNITY
+ {/*成为社区成员,尽情发挥您的创意
{ i.level }
+{ i.todo }
+{ i.plan }
- { k % 2 === 0 && } - -
-
- { i.title }
-
{ i.desc }
-集萃群智经验 交流心得体会
- -{ data.homepagePartnersTitle }
-