| | |
| | | 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)) { |
| | |
| | | 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; |
| | |
| | | }) |
| | | .catch((err) => { |
| | | console.log(err); |
| | | window.location.href = window.location.origin + '#/login'; |
| | | // history.push('/login'); |
| | | }); |
| | | } |