Browse Source

fix:如果已经到重新登录页面则不进行弹窗提示

puhui999 1 year ago
parent
commit
2385cd9b9a
1 changed files with 4 additions and 0 deletions
  1. 4 0
      src/config/axios/service.ts

+ 4 - 0
src/config/axios/service.ts

@@ -217,6 +217,10 @@ const refreshToken = async () => {
 const handleAuthorized = () => {
   const { t } = useI18n()
   if (!isRelogin.show) {
+    // 如果已经到重新登录页面则不进行弹窗提示
+    if (window.location.href.includes('login?redirect=')) {
+      return
+    }
     isRelogin.show = true
     ElMessageBox.confirm(t('sys.api.timeoutMessage'), t('common.confirmTitle'), {
       showCancelButton: false,