From 38d8379be1fd9a72b8bd511dfb57ad67292bdf1e Mon Sep 17 00:00:00 2001
From: king <18310653075@163.com>
Date: 星期五, 29 十月 2021 18:42:32 +0800
Subject: [PATCH] 2021-10-29

---
 src/components/header/index.jsx |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/src/components/header/index.jsx b/src/components/header/index.jsx
index 0c8f549..281b65e 100644
--- a/src/components/header/index.jsx
+++ b/src/components/header/index.jsx
@@ -13,6 +13,7 @@
   initMenuPermission,
   logout
 } from '@/store/action'
+import asyncComponent from '@/utils/asyncComponent'
 import Api from '@/api'
 import MKEmitter from '@/utils/events.js'
 import options from '@/store/options.js'
@@ -20,12 +21,12 @@
 import enUS from '@/locales/en-US/main.js'
 import Utils from '@/utils/utils.js'
 import avatar from '@/assets/img/avatar.jpg'
-import Resetpwd from './resetpwd'
-import LoginForm from './loginform'
 import './index.scss'
 
 const { confirm } = Modal
 const { Search } = Input
+const Resetpwd = asyncComponent(() => import('./resetpwd'))
+const LoginForm = asyncComponent(() => import('./loginform'))
 
 class Header extends Component {
   static propTpyes = {
@@ -87,9 +88,14 @@
         if (result.status) {
           notification.success({
             top: 92,
-            message: this.state.dict['main.password.resetsuccess'],
+            message: '淇敼鎴愬姛锛岃閲嶆柊鐧诲綍銆�',
             duration: 2
           })
+          setTimeout(() => {
+            sessionStorage.clear()
+            this.props.logout()
+            this.props.history.replace('/login')
+          }, 2000)
         } else {
           notification.warning({
             top: 92,

--
Gitblit v1.8.0