From a4f102defd2c7918617717f3307b6a3ef63859ff Mon Sep 17 00:00:00 2001 From: Mr Ke <kelq@hugeinfo.com.cn> Date: Fri, 29 May 2020 18:03:17 +0800 Subject: [PATCH] 绩效总览 (列表、详情)、绩效指标 (配置) --- src/api/request.js | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/api/request.js b/src/api/request.js index 5d6752d..10f16d4 100644 --- a/src/api/request.js +++ b/src/api/request.js @@ -3,7 +3,9 @@ import { message } from 'antd'; import { NetworkState, BASE_URL, MockUrl } from './httpurl'; +import { createHashHistory } from 'history'; const CODE_SUCCESS = '200'; +const history = createHashHistory(); let recognitionParams = [].reduce((p, n) => { if (eval(n)) { @@ -64,8 +66,7 @@ code == '10003' ) { // token失效重新返回登录页面 - // this.props.history.push({ pathname: '/login' }); - window.location.href = window.location.origin + '#/login'; + history.push('/login'); } else { message.warning(msg); return false; @@ -73,6 +74,6 @@ }) .catch((err) => { console.log(err); - window.location.href = window.location.origin + '#/login'; + // history.push('/login'); }); } -- Gitblit v1.8.0