Parcourir la source

fix: 设置 vite basePath 后,重新登录跳转路由错误

马光祖 il y a 2 ans
Parent
commit
d0d6a13285
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/config/axios/service.ts

+ 1 - 1
src/config/axios/service.ts

@@ -229,7 +229,7 @@ const handleAuthorized = () => {
         wsCache.clear()
         removeToken()
         isRelogin.show = false
-        window.location.href = '/'
+        window.location.href = import.meta.env.VITE_BASE_PATH
       })
       .catch(() => {
         isRelogin.show = false