Explorar o código

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

louhangfei hai 1 ano
pai
achega
4270269cbb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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}`;
 };