diff --git a/src/boot/axios.js b/src/boot/axios.js index 1235d58e..07a52ea7 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -40,9 +40,9 @@ const onResponseError = error => { Router.push({ name: 'login' }); userStore.destroy(false); - } else if (!userStore.isLoggedIn) { - return Promise.reject(error); } + + return Promise.reject(error); }; export default boot(({ app }) => { diff --git a/src/stores/user.js b/src/stores/user.js index 90aaa688..91278afa 100644 --- a/src/stores/user.js +++ b/src/stores/user.js @@ -336,6 +336,7 @@ export const useUserStore = defineStore('user', () => { logoutSupplantedUser, updateUserLang, init, - $reset + $reset, + onLogin }; });