Commit a6fee6b7 authored by JerryYu2014's avatar JerryYu2014 Committed by 陈帅

Update login.js (#4103)

解决在组件componentDidMount()方法中调用多个接口失败时(如:401情况)返回登录界面的query string 中会递归叠加多个redirect参数的问题;解决代码导致 lint 挂了的问题。
parent b8c5c015
...@@ -53,8 +53,9 @@ export default { ...@@ -53,8 +53,9 @@ export default {
}, },
}); });
reloadAuthorized(); reloadAuthorized();
const { redirect } = getPageQuery();
// redirect // redirect
if (window.location.pathname !== '/user/login') { if (window.location.pathname !== '/user/login' && !redirect) {
yield put( yield put(
routerRedux.replace({ routerRedux.replace({
pathname: '/user/login', pathname: '/user/login',
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment