From 45d9f224774dc1b3afa36b9e0a16b58883392c8d Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 31 May 2023 17:34:48 +0800 Subject: [PATCH] build --- src/forge/Information/Pages/headerPage.jsx | 52 +++++++------- src/forge/Information/Pages/main.jsx | 25 ++----- src/forge/Information/Pages/newsDetail.jsx | 7 +- src/forge/Information/Pages/newsList.jsx | 15 +++-- src/forge/Information/Pages/projectSource.jsx | 13 ++-- src/forge/Information/Pages/zoneVIP.jsx | 7 +- src/forge/Information/index.jsx | 67 +++++++++++-------- src/forge/Information/index.scss | 14 +++- 8 files changed, 107 insertions(+), 93 deletions(-) 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(