Ver código fonte

fix: 三方登录重定向地址

wzyyy 3 anos atrás
pai
commit
61abdde624
1 arquivos alterados com 1 adições e 1 exclusões
  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 goRedirect = () => {
     const urlParams = new URLSearchParams(window.location.hash);
     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];
     // const url = window.location.href.split('redirect=')?.[1];
     console.log(redirectUrl);
     console.log(redirectUrl);
     if (redirectUrl) {
     if (redirectUrl) {