diff --git a/src/models/login.js b/src/models/login.js index 9c68dddf69f0d83ca5764456f43e5a5504b413b9..d99f2f7ad9f70a5420b0d73d48946459f28d0fa9 100644 --- a/src/models/login.js +++ b/src/models/login.js @@ -1,8 +1,9 @@ import { routerRedux } from 'dva/router'; +import { stringify } from 'qs'; import { fakeAccountLogin } from '../services/api'; import { setAuthority } from '../utils/authority'; import { reloadAuthorized } from '../utils/Authorized'; -import { getPageQuery, getQueryPath } from '../utils/utils'; +import { getPageQuery } from '../utils/utils'; export default { namespace: 'login', @@ -49,11 +50,12 @@ export default { }); reloadAuthorized(); yield put( - routerRedux.push( - getQueryPath('/user/login', { + routerRedux.push({ + pathname: '/user/login', + search: stringify({ redirect: window.location.href, - }) - ) + }), + }) ); }, },