From 98a4ae970ca1fff1857c27f0910c030482770b41 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期五, 26 八月 2022 13:02:33 +0800 Subject: [PATCH] 2022-08-26 --- src/views/mainparams/index.jsx | 6 ++---- 1 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/views/mainparams/index.jsx b/src/views/mainparams/index.jsx index c00db29..ac337c6 100644 --- a/src/views/mainparams/index.jsx +++ b/src/views/mainparams/index.jsx @@ -4,11 +4,9 @@ import './index.scss' class MainParams extends Component { - UNSAFE_componentWillMount() { - sessionStorage.setItem('ThirdMenu', this.props.match.params.menuId) - } - componentDidMount() { + sessionStorage.setItem('ThirdMenu', this.props.match.params.menuId) + if (sessionStorage.getItem('UserID')) { this.props.history.replace('/main') } else { -- Gitblit v1.8.0