Explorar o código

登录过期跳转页面

lex %!s(int64=3) %!d(string=hai) anos
pai
achega
410f3b21d8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)