From 9568be9ce657b42bc0f1645a8db6a1db96447daf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Sat, 13 Jan 2024 10:09:23 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91bug=E3=80=81?= =?UTF-8?q?=E4=B8=93=E5=8C=BAtitle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsCreate.jsx | 3 ++- src/forge/Information/Pages/newsDetail.jsx | 5 +++-- src/forge/Information/Pages/selfList.jsx | 3 ++- src/forge/Information/Pages/sourceDetail.jsx | 2 +- src/forge/Information/index.jsx | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/forge/Information/Pages/newsCreate.jsx b/src/forge/Information/Pages/newsCreate.jsx index 5926af15d..24721d43a 100644 --- a/src/forge/Information/Pages/newsCreate.jsx +++ b/src/forge/Information/Pages/newsCreate.jsx @@ -22,6 +22,7 @@ function NewsCreate(props){ const [dirList, setDirList] = useState(undefined); const [loading, setLoading] = useState(false); const [isEdit, setIsEdit] = useState(false); + const { sectionCmsTitle } = props.data; const layout = { labelCol: { span: 2 }, wrapperCol: { span: 14 }, @@ -123,7 +124,7 @@ function NewsCreate(props){ return(
- {tempConfig[temp].mainTitle} + { sectionCmsTitle } {isEdit ? '编辑' : '新建'}文章
diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index ac736791a..713fe41ba 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -19,7 +19,7 @@ function NewsDetail(props){ const [ isSpin , setIsSpin]=useState(false); const [ commentReload, setCommentReload] = useState(undefined); const temp = props.temp; - const zonedetail = props.data; + const { zonedetail, sectionCmsTitle, mainTitle } = props.data; useEffect(()=>{ let initialContent = undefined; @@ -33,6 +33,7 @@ function NewsDetail(props){ document.querySelector('meta[name="viewport"]').setAttribute('content','width=device-width, user-scalable=no,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0'); } return()=>{ + document.title = mainTitle; if(IsPC()){ document.querySelector('meta[name="viewport"]').setAttribute('content', initialContent); } @@ -99,7 +100,7 @@ function NewsDetail(props){ { !IsPC() && - {tempConfig[temp].mainTitle} + { sectionCmsTitle } { cmsDir && {cmsDir.name} } 正文 diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 74d11df27..76b888abd 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -22,6 +22,7 @@ function SelfList(props){ const pathname = props.location.pathname; const { deptId} = props.match.params; const { id , temp , data } = props; + const { sectionCmsTitle } = data; const limit = 15; useEffect(()=>{ @@ -142,7 +143,7 @@ function SelfList(props){
- {source ? "资源发布": temp === tempEnum.zone1 ? "新闻资讯":"领域资讯"} + { sectionCmsTitle } 我的{source ? "资源":"文章"}