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