Sfoglia il codice sorgente

fix: 修复登出后默认跳转到首页

louhangfei 1 anno fa
parent
commit
4270269cbb
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      src/utils/getRedirectUrl.ts

+ 1 - 1
src/utils/getRedirectUrl.ts

@@ -10,6 +10,6 @@ export const getRedirectUrl = () => {
 
 export const getLogoutUrl = () => {
   if (!loginApp) return '';
-  const encodeUrl = encodeURIComponent(window.location.href);
+  const encodeUrl = encodeURIComponent(location.pathname);
   return loginApp + `logout?redirect=${encodeUrl}`;
 };