Commit 6ead55c9a4950ae8cdb01dadcf6eebfd77296bc9

Authored by Dunfa Jiang
1 parent 50813e6f

feat:优化token过期重新跳转逻辑

Showing 1 changed file with 1 additions and 1 deletions
@@ -87,7 +87,7 @@ service.interceptors.response.use(res => { @@ -87,7 +87,7 @@ service.interceptors.response.use(res => {
87 ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => { 87 ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
88 isRelogin.show = false 88 isRelogin.show = false
89 useUserStore().logOut().then(() => { 89 useUserStore().logOut().then(() => {
90 - location.href = '/' 90 + location.href = import.meta.env.VITE_APP_BASE_URL || '/'
91 }) 91 })
92 }).catch(() => { 92 }).catch(() => {
93 isRelogin.show = false 93 isRelogin.show = false
Please register or login to post a comment