diff --git a/src/forge/Information/Pages/headerPage.jsx b/src/forge/Information/Pages/headerPage.jsx index 020252ec4..450fa603f 100644 --- a/src/forge/Information/Pages/headerPage.jsx +++ b/src/forge/Information/Pages/headerPage.jsx @@ -11,16 +11,18 @@ function HeaderPage(props){ const [ personList , setPersonList ] = useState(undefined); const [ newsList, setNewsList ] = useState(undefined); const { deptId } = props.match.params; - const { data } = props; + const { data,address } = props; useEffect(()=>{ - getProjectList(); - getNewsList(); - getPersonList(); - },[]) + if(address){ + getProjectList(); + getNewsList(); + getPersonList(); + } + },[address]) function getPersonList(){ - const url = `/zone/open/${deptId}/member/homePageList`; + const url = `${address}/zone/open/${deptId}/member/homePageList`; axios.get(url).then(result=>{ if(result){ setPersonList(result.data.rows); @@ -29,7 +31,7 @@ function HeaderPage(props){ } function getNewsList(){ - const url = `/cms/doc/open/zone/${deptId}/homePageDocList`; + const url = `${address}/cms/doc/open/zone/${deptId}/homePageDocList`; axios.get(url).then(result=>{ if(result){ setNewsList(result.data.rows); @@ -38,7 +40,7 @@ function HeaderPage(props){ } function getProjectList(){ - const url = `/zone/open/${deptId}/project/list`; + const url = `${address}/zone/open/${deptId}/project/list`; axios.get(url,{params:{ isHomepage:1 }}).then(result=>{ @@ -49,28 +51,28 @@ function HeaderPage(props){ } return(
{data && data.firstTitle}
-{data.introductionTitle}
-{data.introductionContent}
-{data.firstTitle}
} + { + data && (data.introductionTitle || data.introductionContent || data.introductionImage) && +{data.introductionTitle}
+{data.introductionContent}
+新闻动态
{ newsList && newsList.length>0 &&{newsList[0].name}
+{newsList[0].summary}
@@ -113,7 +115,7 @@ function HeaderPage(props){
{i.projectProperties && i.projectProperties.description ? i.projectProperties.description : "暂无~"}
领域资讯
@@ -100,7 +89,7 @@ function Main(props){ return(