Browse Source

fix: 登录不加载菜单

pull/111/head
cp3hnu 1 year ago
parent
commit
fd3d848520
4 changed files with 7 additions and 6 deletions
  1. +4
    -4
      react-ui/config/proxy.ts
  2. +1
    -0
      react-ui/src/app.tsx
  3. +1
    -1
      react-ui/src/pages/Workspace/index.less
  4. +1
    -1
      react-ui/src/services/session.ts

+ 4
- 4
react-ui/config/proxy.ts View File

@@ -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,
},
},


+ 1
- 0
react-ui/src/app.tsx View File

@@ -193,6 +193,7 @@ export function render(oldRender: () => void) {
oldRender();
})
.catch(() => {
setRemoteMenu([]);
oldRender();
});
}


+ 1
- 1
react-ui/src/pages/Workspace/index.less View File

@@ -49,7 +49,7 @@
position: fixed;
right: 30px;
bottom: 20px;
z-index: 999;
z-index: 99;
width: 64px;
height: 64px;
background-color: white;


+ 1
- 1
react-ui/src/services/session.ts View File

@@ -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;


Loading…
Cancel
Save