优化登录弹框

This commit is contained in:
不做码农 2023-07-19 11:44:56 +08:00
parent 5e19346641
commit 00ec12bac3
2 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,5 @@
import router from './router' import router from './router'
import { ElMessage } from 'element-plus' // import { ElMessage } from 'element-plus'
import NProgress from 'nprogress' import NProgress from 'nprogress'
import 'nprogress/nprogress.css' import 'nprogress/nprogress.css'
import { getToken } from '@/utils/auth' import { getToken } from '@/utils/auth'

View File

@ -64,7 +64,9 @@ service.interceptors.response.use(
useUserStore() useUserStore()
.logOut() .logOut()
.then(() => { .then(() => {
location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index' if (location.pathname.indexOf('/login') != 0) {
location.href = import.meta.env.VITE_APP_ROUTER_PREFIX + 'index'
}
}) })
}) })