From 4991bc08e414f371c624151f671236fcfed0bf01 Mon Sep 17 00:00:00 2001
From: Mr Ke <kelq@hugeinfo.com.cn>
Date: Wed, 27 May 2020 14:41:24 +0800
Subject: [PATCH] 修改报错问题

---
 src/module/login/login.jsx |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/src/module/login/login.jsx b/src/module/login/login.jsx
index 30856a9..591d4c7 100644
--- a/src/module/login/login.jsx
+++ b/src/module/login/login.jsx
@@ -12,6 +12,9 @@
 import logo from '../../img/logo.png';
 import fetch from '../../api/request';
 import { oaMenus, userMenus, getMenuListByPermission } from '../../menu';
+import { Context } from '../../index';
+import { createHashHistory } from 'history';
+const history = createHashHistory();
 
 class NormalLoginForm extends React.Component {
   constructor(props) {
@@ -79,9 +82,10 @@
           }
         }));//所有模块菜单
         message.success('登录成功');
-        setTimeout(() => {
-          this.props.history.push({ pathname: "/index" });
-        }, 1500);//延时跳转
+        console.log('this props', this.props);
+        history.push({ pathname: "/index" });
+
+        this.props.setContext && this.props.setContext({ role: 'oa' })
       }
     })
   }
@@ -139,7 +143,6 @@
           </div>
           <div className="login-div-bottom">2011 10215489广州恒巨信息科技有限公司 版权所有 - 粤ICP备10215489号</div>
         </div>
-
       </div>
     );
   }

--
Gitblit v1.8.0