diff --git a/src/forge/Information/Component/contributor.jsx b/src/forge/Information/Component/contributor.jsx index 32459f7ae..dcfd83547 100644 --- a/src/forge/Information/Component/contributor.jsx +++ b/src/forge/Information/Component/contributor.jsx @@ -36,7 +36,7 @@ function Contributor(props) { { i.name &&
- {i.name} +
{i.name}

{i.introduction || "暂无~"}

} diff --git a/src/forge/Information/Component/projects.jsx b/src/forge/Information/Component/projects.jsx index 6ddbee7c8..134023331 100644 --- a/src/forge/Information/Component/projects.jsx +++ b/src/forge/Information/Component/projects.jsx @@ -49,9 +49,9 @@ function Projects(props) { projectList.map((i,k)=>{ return(
-
+
{i.projectProperties && i.projectProperties.authorImageUrl && } -

{i.projectProperties && i.projectProperties.name}

+

window.open(i.projectURL)}>{i.projectProperties && i.projectProperties.name}

{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}

diff --git a/src/forge/Information/Pages/main.jsx b/src/forge/Information/Pages/main.jsx index dc9a90b04..89c38d930 100644 --- a/src/forge/Information/Pages/main.jsx +++ b/src/forge/Information/Pages/main.jsx @@ -29,11 +29,21 @@ function Main(props){ useEffect(()=>{ if(id) { setIsSpin(true); - getMainList(); + if (temp === 'zone') { + getMainList(); + } else { + getCateList(); + } getHotList(); } },[id]) + useEffect(() => { + if (newCateId) { + getSubHotList() + } + }, [newCateId]) + function getMainList(){ const url = `${httpUrl}/cms/doc/open/zone/${id}/docOverviewList`; axios.get(url).then(result=>{ @@ -55,6 +65,20 @@ function Main(props){ }).catch(error=>{}) } + function getCateList() { + const url = `${httpUrl}/cms/doc/open/zone/${id}/dirList`; + axios.get(url).then(result=>{ + if(result){ + let rows = result.data.rows; + setMainList(rows); + if (temp !== 'zone') { + selectCate(rows[0].id) + } + setIsSpin(false); + } + }).catch(error=>{}) + } + function getHotList(){ const url = `${httpUrl}/cms/doc/open/zone/${id}/hotDocList`; axios.get(url,{ @@ -66,6 +90,17 @@ function Main(props){ }).catch(error=>{}) } + function getSubHotList() { + const url = `${httpUrl}/cms/doc/open/dir/${newCateId}/hotDocList`; + axios.get(url,{ + params:{pageSize:15,pageNum:1} + }).then(result=>{ + if(result){ + setHotList(result.data.rows); + } + }).catch(error=>{}) + } + function selectCate(id) { setNewCateId(id) props.history.push(`/${temp}/${deptId}/news/${id}`) diff --git a/src/forge/Information/indexZone1.scss b/src/forge/Information/indexZone1.scss index 35b6437ec..544c899dc 100644 --- a/src/forge/Information/indexZone1.scss +++ b/src/forge/Information/indexZone1.scss @@ -234,7 +234,6 @@ background:#fefefe; } .zone_p_item { - cursor: pointer; width: 364px; height: 320px; border-radius:16px; @@ -258,6 +257,7 @@ font-size: 16px; text-align: center; margin-top: 20px; + cursor: pointer; } .z_p_desc{ margin-top: 18px; @@ -313,6 +313,7 @@ color: #000000; font-size: 16px; text-align: center; + max-width: 240px; } .c_desc { color: #4c5876;