소스 검색

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

louhangfei 1 년 전
부모
커밋
4270269cbb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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}`;
 };