From e8d37e5f4eebf5dabfd5b1bbbf0e63ab1592da87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E5=BF=83=E5=AE=87?= Date: Thu, 21 Sep 2023 16:30:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/newsDetail.jsx | 6 ++++-- src/forge/Information/Pages/sourceDetail.jsx | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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/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(){ From b81489ba5969a2466991c2640b2d2b7a627a2f4d Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 21 Sep 2023 16:35:17 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/Information/Pages/selfList.jsx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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(); + } }) } }