diff --git a/src/forge/Information/Pages/newsDetail.jsx b/src/forge/Information/Pages/newsDetail.jsx index b98da833a..025f16591 100644 --- a/src/forge/Information/Pages/newsDetail.jsx +++ b/src/forge/Information/Pages/newsDetail.jsx @@ -55,8 +55,10 @@ function NewsDetail(props){ }, [detail]) function componentWillUnmount() { - document.title= zonedetail.name; - setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`) + if (zonedetail) { + document.title= zonedetail.name; + setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`) + } } function getDetails(){ diff --git a/src/forge/Information/Pages/selfList.jsx b/src/forge/Information/Pages/selfList.jsx index 68b99556f..dbce4ccdf 100644 --- a/src/forge/Information/Pages/selfList.jsx +++ b/src/forge/Information/Pages/selfList.jsx @@ -84,8 +84,13 @@ function SelfList(props){ }else{ delNewsMyList(deleId).then(response=>{ setVisible(false); - props.showNotification("删除成功!"); - getNew(); + if(status ===1){ + props.history.push(`/zone/${deptId}/newdetail/${deleId}`); + props.showNotification("已提交删除申请,待管理员审核通过后改文章将被删除"); + }else{ + props.showNotification("删除成功!"); + getNew(); + } }) } } diff --git a/src/forge/Information/Pages/sourceDetail.jsx b/src/forge/Information/Pages/sourceDetail.jsx index 9b06fa4c0..cd50906ff 100644 --- a/src/forge/Information/Pages/sourceDetail.jsx +++ b/src/forge/Information/Pages/sourceDetail.jsx @@ -34,8 +34,10 @@ function SourceDetail(props){ }, [detail]) function componentWillUnmount() { - document.title= zonedetail.name; - setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`) + if (zonedetail) { + document.title= zonedetail.name; + setSeoMeta(`${zonedetail.name},`, zonedetail.name, zonedetail.subTitle, `/zone/${deptId}`) + } } function getDetails(){