From fd3d84852043b7e976f1f49d935700e23b1d6394 Mon Sep 17 00:00:00 2001 From: cp3hnu Date: Thu, 25 Jul 2024 10:38:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=99=BB=E5=BD=95=E4=B8=8D=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E8=8F=9C=E5=8D=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- react-ui/config/proxy.ts | 8 ++++---- react-ui/src/app.tsx | 1 + react-ui/src/pages/Workspace/index.less | 2 +- react-ui/src/services/session.ts | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/react-ui/config/proxy.ts b/react-ui/config/proxy.ts index 0fdf89e3..f8875e9d 100644 --- a/react-ui/config/proxy.ts +++ b/react-ui/config/proxy.ts @@ -20,16 +20,16 @@ export default { // localhost:8000/api/** -> https://preview.pro.ant.design/api/** '/api/': { // 要代理的地址 - // target: 'http://172.20.32.181:31205', - target: 'http://172.20.32.98:8082', + target: 'http://172.20.32.181:31213', // 开发环境 + // target: 'http://172.20.32.98:8082', // target: 'http://172.20.32.150:8082', // 配置了这个可以从 http 代理到 https // 依赖 origin 的功能可能需要这个,比如 cookie changeOrigin: true, - pathRewrite: { '^/api': '' }, + // pathRewrite: { '^/api': '' }, }, '/profile/avatar/': { - target: 'http://172.20.32.181:31205', + target: 'http://172.20.32.181:31213', changeOrigin: true, }, }, diff --git a/react-ui/src/app.tsx b/react-ui/src/app.tsx index 9f6db9b9..d6accb30 100644 --- a/react-ui/src/app.tsx +++ b/react-ui/src/app.tsx @@ -193,6 +193,7 @@ export function render(oldRender: () => void) { oldRender(); }) .catch(() => { + setRemoteMenu([]); oldRender(); }); } diff --git a/react-ui/src/pages/Workspace/index.less b/react-ui/src/pages/Workspace/index.less index 60340576..09be2848 100644 --- a/react-ui/src/pages/Workspace/index.less +++ b/react-ui/src/pages/Workspace/index.less @@ -49,7 +49,7 @@ position: fixed; right: 30px; bottom: 20px; - z-index: 999; + z-index: 99; width: 64px; height: 64px; background-color: white; diff --git a/react-ui/src/services/session.ts b/react-ui/src/services/session.ts index a412f35f..cd6c6fa2 100644 --- a/react-ui/src/services/session.ts +++ b/react-ui/src/services/session.ts @@ -2,7 +2,7 @@ import { MenuDataItem } from '@ant-design/pro-components'; import { request } from '@umijs/max'; import React, { lazy } from 'react'; -let remoteMenu: any = []; +let remoteMenu: any = null; export function getRemoteMenu() { return remoteMenu;