From 5d19f6c06b8fa5860458859a4c85747782936228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=A2=E6=80=9D?= <2897217417@qq.com> Date: Wed, 13 Oct 2021 17:17:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=AA=E7=99=BB=E5=BD=95=E7=8A=B6=E6=80=81?= =?UTF-8?q?=E8=BF=9B=E5=85=A5=E6=B6=88=E6=81=AF=E9=A1=B5=E9=9D=A2=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/SecuritySetting/notice/myNotice/Index.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/forge/SecuritySetting/notice/myNotice/Index.jsx b/src/forge/SecuritySetting/notice/myNotice/Index.jsx index 2dac567f8..226606919 100644 --- a/src/forge/SecuritySetting/notice/myNotice/Index.jsx +++ b/src/forge/SecuritySetting/notice/myNotice/Index.jsx @@ -29,10 +29,11 @@ function MyNotice(props) { //登录情况下,通过地址访问,直接跳转:/settings/profile //未登录情况下,通过地址访问,直接跳转:/explore useEffect(()=>{ - let notice_url = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice; - if(!current_user){ + let notice = mygetHelmetapi && mygetHelmetapi.common && mygetHelmetapi.common.notice; + let login = current_user && current_user.login; + if(!login){ history.push(`/explore`); - }else if(!notice_url){ + }else if(!notice){ history.push(`/settings/profile`); } },[mygetHelmetapi])