From 07aa8044f5de18f882d17e55a914bad30a313a8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=8F=E8=81=AA?= Date: Mon, 25 Mar 2019 17:41:14 +0800 Subject: [PATCH] Repeated addition search (#3828) Close: #3791 Close: #3835 --- src/models/login.js | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/models/login.js b/src/models/login.js index 22a563da..b5d226aa 100644 --- a/src/models/login.js +++ b/src/models/login.js @@ -53,14 +53,17 @@ export default { }, }); reloadAuthorized(); - yield put( - routerRedux.replace({ - pathname: '/user/login', - search: stringify({ - redirect: window.location.href, - }), - }) - ); + // redirect + if (window.location.pathname !== '/user/login') { + yield put( + routerRedux.replace({ + pathname: '/user/login', + search: stringify({ + redirect: window.location.href, + }), + }) + ); + } }, }, -- GitLab