File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -184,7 +184,16 @@ const user = {
184184 } ) . catch ( ( ) => {
185185 resolve ( )
186186 } ) . finally ( ( ) => {
187- window . location . href = '/user/logout'
187+ let logoutURL = '/user/logout'
188+ const fullPath = window . location . pathname + window . location . search
189+ if (
190+ fullPath &&
191+ fullPath !== '/'
192+ ) {
193+ logoutURL += `?redirect=${ fullPath } `
194+ }
195+
196+ window . location . href = logoutURL
188197 } )
189198 } )
190199 } ,
Original file line number Diff line number Diff line change @@ -64,7 +64,13 @@ export default {
6464 await this .GetAuthDataEnable ()
6565 this .loading = false
6666 if (! this ._enable_list .length || this ._enable_list .length > 1 ) {
67- this .$router .push (' /user/login' )
67+ let loginURL = ' /user/login'
68+ const redirect = this .$route ? .query ? .redirect
69+ if (redirect) {
70+ loginURL += ` ?redirect=${ redirect} `
71+ }
72+
73+ this .$router .push (loginURL)
6874 }
6975 if (this .auth_auto_redirect ) {
7076 this .time = 0
You can’t perform that action at this time.
0 commit comments