Explorar el Código

fix: 单点登录跳转

Wzyyy98 hace 3 años
padre
commit
c16cf9e415
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      src/pages/account/Center/bind/index.tsx

+ 2 - 1
src/pages/account/Center/bind/index.tsx

@@ -43,7 +43,8 @@ const Bind = () => {
     const redirectUrl = urlParams.get('redirect') || window.location.href.split('redirect=')?.[1];
     const redirectUrl = urlParams.get('redirect') || window.location.href.split('redirect=')?.[1];
     // const url = window.location.href.split('redirect=')?.[1];
     // const url = window.location.href.split('redirect=')?.[1];
     console.log(redirectUrl);
     console.log(redirectUrl);
-    if (redirectUrl) {
+    //内部集成需要跳回它们页面
+    if (redirectUrl && redirectUrl.indexOf('account/center/bind') === -1) {
       window.location.href = decodeURIComponent(redirectUrl);
       window.location.href = decodeURIComponent(redirectUrl);
     }
     }
   };
   };