ソースを参照

fix: merge

Next wzy
hear 3 年 前
コミット
9a39cb1a8f

+ 10 - 0
src/pages/account/Center/bind/index.tsx

@@ -38,6 +38,14 @@ const Bind = () => {
       }
     });
   };
+  const goRedirect = () => {
+    const url = window.location.href.split('redirect=')?.[1];
+    console.log(url);
+    if (url) {
+      window.location.href = url;
+    }
+  };
+
   const getDetail = () => {
     service.getUserDetail().subscribe((res) => {
       setUser(res?.result);
@@ -130,6 +138,7 @@ const Bind = () => {
         await fetchUserInfo();
         localStorage.setItem('onLogin', 'yes');
         onlyMessage('登录成功');
+        goRedirect();
         setTimeout(() => window.close(), 1000);
       },
       error: () => {
@@ -267,6 +276,7 @@ const Bind = () => {
                   service.bind(code).then((res) => {
                     if (res.status === 200) {
                       onlyMessage('绑定成功');
+                      goRedirect();
                       localStorage.setItem('onBind', 'true');
                       setTimeout(() => window.close(), 1000);
                     } else {

+ 8 - 1
src/pages/iframe/index.tsx

@@ -36,7 +36,14 @@ const Iframe = () => {
 
   return (
     <PageContainer>
-      <iframe style={{ width: '100%', height: '800px' }} src={iframeUrl} frameBorder="0"></iframe>
+      <iframe
+        style={{
+          width: '100%',
+          height: 'calc(100vh - 80px)',
+        }}
+        src={iframeUrl}
+        frameBorder="0"
+      ></iframe>
     </PageContainer>
   );
 };

+ 5 - 5
src/pages/oauth/index.tsx

@@ -12,7 +12,7 @@ import React from 'react';
 
 const Oauth = () => {
   const intl = useIntl();
-  const logo = require('/public/logo.svg');
+  // const logo = require('/public/logo.svg');
   const bindPage = require('/public/images/bind/bindPage.png');
   const headerImg = require('/public/logo.png');
 
@@ -230,21 +230,21 @@ const Oauth = () => {
         backgroundSize: '100% 100%',
       }}
     >
-      <div className="oauth-header">
+      {/* <div className="oauth-header">
         <div className="oauth-header-left">
           <img src={logo} />
         </div>
         <div className="oauth-header-right">
-          {/* <a style={{ color: 'rgb(0 0 0 / 70%)' }}>{userName || '-'}</a>
+          <a style={{ color: 'rgb(0 0 0 / 70%)' }}>{userName || '-'}</a>
           <div className="oauth-header-right-connect">|</div>
                     <a
                         style={{ color: 'rgb(0 0 0 / 70%)' }}
                         onClick={(() => {
                             setIsLogin(false)
                         })}
-                    >切换账号</a> */}
+                    >切换账号</a>
         </div>
-      </div>
+      </div> */}
       <div className="oauth-content">
         {isLogin ? (
           <>