Skip to content

Commit f7dc773

Browse files
YunaiVgitee-org
authored andcommitted
!206 回退 'Pull Request !195 : 修复登录后通过登录页面无法再次登录的问题'
Merge pull request !206 from 芋道源码/revert-merge-195-master
2 parents cb4c78b + b68f8be commit f7dc773

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

src/config/axios/service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ let requestList: any[] = []
3131
// 是否正在刷新中
3232
let isRefreshToken = false
3333
// 请求白名单,无须token的接口
34-
const whiteList: string[] = ['/login', '/refresh-token', '/system/tenant/get-id-by-name']
34+
const whiteList: string[] = ['/login', '/refresh-token']
3535

3636
// 创建axios实例
3737
const service: AxiosInstance = axios.create({
@@ -47,7 +47,8 @@ service.interceptors.request.use(
4747
let isToken = (config!.headers || {}).isToken === false
4848
whiteList.some((v) => {
4949
if (config.url) {
50-
return (isToken = config.url.indexOf(v) > -1)
50+
config.url.indexOf(v) > -1
51+
return (isToken = false)
5152
}
5253
})
5354
if (getAccessToken() && !isToken) {

src/views/Login/components/LoginForm.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,6 @@ import { ElLoading } from 'element-plus'
148148
import LoginFormTitle from './LoginFormTitle.vue'
149149
import type { RouteLocationNormalizedLoaded } from 'vue-router'
150150
151-
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
152-
const { wsCache } = useCache()
153151
import { useIcon } from '@/hooks/web/useIcon'
154152
155153
import * as authUtil from '@/utils/auth'
@@ -246,7 +244,6 @@ const handleLogin = async (params) => {
246244
if (!res) {
247245
return
248246
}
249-
wsCache.delete(CACHE_KEY.USER) // 清除上次登录用户信息
250247
ElLoading.service({
251248
lock: true,
252249
text: '正在加载系统中...',

0 commit comments

Comments
 (0)