diff --git a/src/utils/request.js b/src/utils/request.js index 019a84c..cf82751 100644 --- a/src/utils/request.js +++ b/src/utils/request.js @@ -64,8 +64,9 @@ service.interceptors.response.use( useUserStore() .logOut() .then(() => { + var redirectUrl = window.location.pathname if (location.pathname.indexOf('/login') != 0) { - location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index' + location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index?redirect=' + redirectUrl } }) })