瀏覽代碼

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