From 0c1a33a33b45fc3265cb7fef20beb48407cd6c98 Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期四, 24 八月 2023 14:54:06 +0800
Subject: [PATCH] 2023-08-24

---
 src/views/systemproc/index.jsx |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/views/systemproc/index.jsx b/src/views/systemproc/index.jsx
index 07d4919..9f1f68a 100644
--- a/src/views/systemproc/index.jsx
+++ b/src/views/systemproc/index.jsx
@@ -1,5 +1,6 @@
 import React, {Component} from 'react'
 import { ConfigProvider } from 'antd'
+import { withRouter } from 'react-router-dom'
 import zhCN from 'antd/es/locale/zh_CN'
 
 import Header from '../systemfunc/header'
@@ -7,6 +8,12 @@
 import './index.scss'
 
 class SysProc extends Component {
+  componentDidMount() {
+    if (!sessionStorage.getItem('UserID')) {
+      this.props.history.replace('/login')
+    }
+  }
+
   render () {
     const { params } = this.props.match
     let func = params && params.func ? params.func : ''
@@ -22,4 +29,4 @@
   }
 }
 
-export default SysProc
\ No newline at end of file
+export default withRouter(SysProc)
\ No newline at end of file

--
Gitblit v1.8.0