Prechádzať zdrojové kódy

fix: 三方登录重定向地址

wzyyy 3 rokov pred
rodič
commit
61abdde624
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/pages/account/Center/bind/index.tsx

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

@@ -40,7 +40,7 @@ const Bind = () => {
   };
   const goRedirect = () => {
     const urlParams = new URLSearchParams(window.location.hash);
-    const redirectUrl = urlParams.get('redirect');
+    const redirectUrl = urlParams.get('redirect') || window.location.href.split('redirect=')?.[1];
     // const url = window.location.href.split('redirect=')?.[1];
     console.log(redirectUrl);
     if (redirectUrl) {