瀏覽代碼

fix: 三方登录重定向地址

wzyyy 3 年之前
父節點
當前提交
61abdde624
共有 1 個文件被更改,包括 1 次插入 和 1 次删除
  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) {