|
@@ -92,7 +92,9 @@ axios.interceptors.request.use(config => {
|
|
|
sessionStorage.setItem('apiCount', requestStack.length)
|
|
|
if(!refreshing) {
|
|
|
refreshing = true
|
|
|
- refreshToken()
|
|
|
+ loginOut()
|
|
|
+ sessionStorage.setItem('loginOut', 'Token验证失败')
|
|
|
+ // refreshToken()
|
|
|
}
|
|
|
return handleRefresh
|
|
|
}, error => {
|
|
@@ -135,7 +137,7 @@ axios.interceptors.response.use(response => {
|
|
|
sessionStorage.setItem('loginOut', error.config.url + ':API401,重新登录')
|
|
|
sessionStorage.setItem('APIInfo', JSON.stringify(error))
|
|
|
console.log('loginOut', error.config.url + ':API401,重新登录');
|
|
|
- window.location.href = '/home/homePage'
|
|
|
+ window.location.href = '/login/admin'
|
|
|
app.$message({
|
|
|
type: 'error',
|
|
|
message: 'http.error401'
|
|
@@ -246,7 +248,7 @@ function loginOut() {
|
|
|
localStorage.clear()
|
|
|
console.log('超时退出');
|
|
|
// router.push({path: '/home/homePage'})
|
|
|
- window.location.href = window.location.origin + '/home/homePage'
|
|
|
+ window.location.href = window.location.origin + '/login/admin'
|
|
|
}
|
|
|
|
|
|
/**
|