Skip to content

Commit

Permalink
[*] 修复 token 过期强制登出 BUG
Browse files Browse the repository at this point in the history
  • Loading branch information
Muska-Ami committed Sep 14, 2024
1 parent 9dbd8b4 commit be691df
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import nginx from 'highlight.js/lib/languages/nginx'
import api from '@/api'
import { sendWarningMessage } from '@/utils/message'
import { logout } from '@/utils/profile'
import router from '@/router/index'
// import { init_ws, SetOnMessageFunction } from "@/utils/websocket.js";
// import { sendInfoNotification } from '@/utils/notification'
Expand Down Expand Up @@ -91,6 +92,7 @@ setInterval(async () => {
if (rs.status === 401) {
sendWarningMessage('登录过期或未登录,请重新登录后台!')
logout()
router.push('/login')
}
}
}, 10000)
Expand Down

0 comments on commit be691df

Please sign in to comment.