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;