Browse Source

Update login.js (#4103)

解决在组件componentDidMount()方法中调用多个接口失败时(如:401情况)返回登录界面的query string 中会递归叠加多个redirect参数的问题;解决代码导致 lint 挂了的问题。
pull/4114/head
JerryYu2014 8 years ago
committed by 陈帅
parent
commit
a6fee6b72b
  1. 3
      src/models/login.js

3
src/models/login.js

@ -53,8 +53,9 @@ export default {
},
});
reloadAuthorized();
const { redirect } = getPageQuery();
// redirect
if (window.location.pathname !== '/user/login') {
if (window.location.pathname !== '/user/login' && !redirect) {
yield put(
routerRedux.replace({
pathname: '/user/login',

Loading…
Cancel
Save