Browse Source

登录过期跳转页面

lex 3 năm trước cách đây
mục cha
commit
410f3b21d8
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  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)