Explorar o código

fix: bug及应用管理

wzyyy %!s(int64=3) %!d(string=hai) anos
pai
achega
4315742424

+ 4 - 4
config/proxy.ts

@@ -15,10 +15,10 @@ export default {
       // target: 'http://120.79.18.123:8844/',
       // ws: 'ws://120.79.18.123:8844/',
       // 测试环境
-      // target: 'http://120.77.179.54:8844/',
-      // ws: 'ws://120.77.179.54:8844/',
-      target: 'http://192.168.32.65:8848/',
-      ws: 'ws://192.168.32.65:8848/',
+      target: 'http://120.77.179.54:8844/',
+      ws: 'ws://120.77.179.54:8844/',
+      // target: 'http://192.168.32.65:8848/',
+      // ws: 'ws://192.168.32.65:8848/',
       //v2环境
       // ws: 'ws://47.109.52.230:8844',
       // target: 'http://47.109.52.230:8844',

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

@@ -39,7 +39,7 @@ const Iframe = () => {
       <iframe
         style={{
           width: '100%',
-          height: 'calc(100vh - 80px)',
+          height: 'calc(100vh - 140px)',
         }}
         src={iframeUrl}
         frameBorder="0"

+ 21 - 9
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');
 
@@ -69,7 +69,6 @@ const Oauth = () => {
     const res = await Service.getOAuth2(data || params);
     if (res.status === 200) {
       window.location.href = res.result;
-      console.log(res.result, '222222222222');
     } else {
       getCode();
     }
@@ -146,6 +145,7 @@ const Oauth = () => {
   };
 
   const getQueryVariable = (variable: any) => {
+    // console.log(window.location.search)
     const query = window.location.search.substring(1);
     const vars = query.split('&');
     for (let i = 0; i < vars.length; i++) {
@@ -180,8 +180,9 @@ const Oauth = () => {
   }, []);
 
   useEffect(() => {
+    let redirectUrl;
     const items = {
-      code: getQueryVariable('code'),
+      // code: getQueryVariable('code'),
       client_id: getQueryVariable('client_id'),
       state: getQueryVariable('state'),
       redirect_uri: decodeURIComponent(getQueryVariable('redirect_uri')),
@@ -189,13 +190,24 @@ const Oauth = () => {
       scope: getQueryVariable('scope'),
     };
     const item = getQueryVariable('internal');
+    if (items.redirect_uri) {
+      // console.log(items.redirect_uri,'params')
+      const orgin = items.redirect_uri.split('/').slice(0, 3);
+      // console.log(orgin)
+      const url = `${orgin.join('/')}/%23/${items.redirect_uri?.split('redirect=')[1]}`;
+      redirectUrl = `${items.redirect_uri?.split('redirect=')[0]}redirect=${url}`;
+    }
     getLoginUser({
       ...items,
       internal: getQueryVariable('internal'),
+      redirect_uri: redirectUrl,
     });
     setLinternal(item);
-    setParams(items);
-    console.log(item, items, 'oauth');
+    setParams({
+      ...items,
+      redirect_uri: redirectUrl,
+    });
+    // console.log(items, '11111111111')
   }, [window.location]);
 
   //未登录状态
@@ -230,11 +242,11 @@ 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">
+        {/* <div className="oauth-header-right">
           <a style={{ color: 'rgb(0 0 0 / 70%)' }}>{userName || '-'}</a>
           <div className="oauth-header-right-connect">|</div>
                     <a
@@ -243,8 +255,8 @@ const Oauth = () => {
                             setIsLogin(false)
                         })}
                     >切换账号</a>
-        </div>
-      </div> */}
+        </div> */}
+      </div>
       <div className="oauth-content">
         {isLogin ? (
           <>

+ 2 - 1
src/pages/system/Role/Detail/UserManage/BindUser.tsx

@@ -66,7 +66,8 @@ const BindUser = (props: Props) => {
         roleService.bindUser(props.data.id, selectedRowKeys).subscribe((resp) => {
           if (resp.status === 200) {
             onlyMessage('操作成功!');
-            actionRef.current?.reload();
+            // actionRef.current?.reload();
+            props.cancel();
           }
         });
         setSelectedRowKeys([]);