Merge pull request '面包屑bug、专区title' (#611) from Eeeros/forgeplus-react:pre_gitlink_server into pre_gitlink_server
1
This commit is contained in:
commit
45a4f60902
|
|
@ -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(
|
||||
<div className='boxmain pt30 newsCreateBox pb100'>
|
||||
<Breadcrumb separator=">">
|
||||
<Breadcrumb.Item href={`/zone/${deptId}/news`}>{tempConfig[temp].mainTitle}</Breadcrumb.Item>
|
||||
<Breadcrumb.Item href={`/zone/${deptId}/news`}>{ sectionCmsTitle }</Breadcrumb.Item>
|
||||
<Breadcrumb.Item>{isEdit ? '编辑' : '新建'}文章</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<div className='formBox'>
|
||||
|
|
|
|||
|
|
@ -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() &&
|
||||
<Breadcrumb separator=">">
|
||||
<Breadcrumb.Item href={`/zone/${deptId}/news`}>{tempConfig[temp].mainTitle}</Breadcrumb.Item>
|
||||
<Breadcrumb.Item href={`/zone/${deptId}/news`}>{ sectionCmsTitle }</Breadcrumb.Item>
|
||||
{ cmsDir && <Breadcrumb.Item href={`/zone/${deptId}/news/${cmsDir.id}`}>{cmsDir.name}</Breadcrumb.Item> }
|
||||
<Breadcrumb.Item>正文</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
|
|
|
|||
|
|
@ -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){
|
|||
</div>
|
||||
</Modal>
|
||||
<Breadcrumb separator=">" style={{paddingTop:"20px"}}>
|
||||
<Breadcrumb.Item><Link className="primaryColor" to={pathname.replace("/self","")}>{source ? "资源发布": temp === tempEnum.zone1 ? "新闻资讯":"领域资讯"}</Link></Breadcrumb.Item>
|
||||
<Breadcrumb.Item><Link className="primaryColor" to={pathname.replace("/self","")}>{ sectionCmsTitle }</Link></Breadcrumb.Item>
|
||||
<Breadcrumb.Item>我的{source ? "资源":"文章"}</Breadcrumb.Item>
|
||||
</Breadcrumb>
|
||||
<ul className="selfMenu">
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ function SourceDetail(props){
|
|||
|
||||
function componentWillUnmount() {
|
||||
if (zonedetail) {
|
||||
document.title= zonedetail.name;
|
||||
document.title= zonedetail.mainTitle;
|
||||
setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ function Index(props){
|
|||
setTemp( data.template )
|
||||
}
|
||||
setData(data);
|
||||
document.title= data && data.name;
|
||||
document.title= data && data.mainTitle;
|
||||
setId(data.id);
|
||||
if(data.id){
|
||||
getAdminUrl(data.id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue