Browse Source

Merge branch 'lhf-fix' into 'dev'

增加redirect地址

See merge request skyeye/skyeye_frontend/skyeye-admin!12
航飞 楼 1 year ago
parent
commit
968898c0a9
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/utils/getRedirectUrl.ts

+ 2 - 1
src/utils/getRedirectUrl.ts

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