mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-30 11:11:55 +08:00
parent
0b23ce416e
commit
998d23db61
@ -129,7 +129,6 @@ service.interceptors.response.use(
|
|||||||
isRefreshToken = true
|
isRefreshToken = true
|
||||||
// 1. 如果获取不到刷新令牌,则只能执行登出操作
|
// 1. 如果获取不到刷新令牌,则只能执行登出操作
|
||||||
if (!getRefreshToken()) {
|
if (!getRefreshToken()) {
|
||||||
console.info(getRefreshToken())
|
|
||||||
return handleAuthorized()
|
return handleAuthorized()
|
||||||
}
|
}
|
||||||
// 2. 进行刷新访问令牌
|
// 2. 进行刷新访问令牌
|
||||||
@ -207,7 +206,6 @@ service.interceptors.response.use(
|
|||||||
)
|
)
|
||||||
|
|
||||||
const refreshToken = async () => {
|
const refreshToken = async () => {
|
||||||
axios.defaults.headers.common['tenant-id'] = getTenantId()
|
|
||||||
return await axios.post(base_url + '/system/auth/refresh-token?refreshToken=' + getRefreshToken())
|
return await axios.post(base_url + '/system/auth/refresh-token?refreshToken=' + getRefreshToken())
|
||||||
}
|
}
|
||||||
const handleAuthorized = () => {
|
const handleAuthorized = () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user