lex 3 лет назад
Родитель
Сommit
410f3b21d8
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      src/helpers/request.ts

+ 1 - 1
src/helpers/request.ts

@@ -84,7 +84,7 @@ request.interceptors.response.use(
 
       if (data.code === 403) {
         removeAuth()
-        window.location.href = location.origin
+        window.location.href = location.origin + location.pathname
         ElMessage.error('登录已过期,请重新登录')
       }
       throw new Error(msg)