瀏覽代碼

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

马光祖 2 年之前
父節點
當前提交
d0d6a13285
共有 1 個文件被更改,包括 1 次插入1 次删除
  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