diff --git a/src/models/app.js b/src/models/app.js index 2ed12b8..57cf51a 100644 --- a/src/models/app.js +++ b/src/models/app.js @@ -43,11 +43,8 @@ export default { yield put(routerRedux.push('/dashboard')) } } else { - if (location.pathname !== '/login') { + if (config.openPages && config.openPages.indexOf(location.pathname) < 0) { let from = location.pathname - if (location.pathname === '/dashboard') { - from = '/dashboard' - } window.location = `${location.origin}/login?from=${from}` } }