回退 'Pull Request !195 : 修复登录后通过登录页面无法再次登录的问题'

This commit is contained in:
芋道源码 authored and Gitee committed 2023-08-19 08:01:09 +00:00
1 parent cb4c78b1ac
commit b68f8be751
2 files changed
+3 -5

No files matched your search

+3 -2
View File
@@ -31,7 +31,7 @@ let requestList: any[] = []
// 是否正在刷新中
let isRefreshToken = false
// 请求白名单,无须token的接口
const whiteList: string[] = ['/login', '/refresh-token', '/system/tenant/get-id-by-name']
const whiteList: string[] = ['/login', '/refresh-token']
// 创建axios实例
const service: AxiosInstance = axios.create({
@@ -47,7 +47,8 @@ service.interceptors.request.use(
let isToken = (config!.headers || {}).isToken === false
whiteList.some((v) => {
if (config.url) {
return (isToken = config.url.indexOf(v) > -1)
config.url.indexOf(v) > -1
return (isToken = false)
}
})
if (getAccessToken() && !isToken) {