diff --git a/src/models/login.js b/src/models/login.js index 05c1913ec173a28c77c733cdbe9b5981f6f2b044..8e6287cf7cf55b4fcfb403b6dc7871488fe6ab6e 100644 --- a/src/models/login.js +++ b/src/models/login.js @@ -21,7 +21,7 @@ export default { // Login success after permission changes to admin or user // The refresh will automatically redirect to the home page // yield put(routerRedux.push('/')); - location.reload(); + window.location.reload(); } }, *logout(_, { put }) { @@ -35,7 +35,7 @@ export default { // yield put(routerRedux.push('/user/login')); // Login out after permission changes to admin or user // The refresh will automatically redirect to the login page - location.reload(); + window.location.reload(); }, },