From d13c8811b4bf94dd7a91af0d00568e1da27d0df9 Mon Sep 17 00:00:00 2001 From: yoyo837 Date: Thu, 28 Jun 2018 10:06:12 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E4=BD=BF=E7=94=A8=E5=AD=97=E7=AC=A6?= =?UTF-8?q?=E4=B8=B2=E7=9A=84=E5=9C=B0=E6=96=B9=20=E4=BD=BF=E7=94=A8=20pus?= =?UTF-8?q?h(location:=20LocationDescriptor,=20state=3F:=20LocationState)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/models/login.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/models/login.js b/src/models/login.js index 9c68dddf..d99f2f7a 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, - }) - ) + }), + }) ); }, }, -- GitLab