Преглед изворни кода

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}`;
 };