fix: 登录不加载菜单
This commit is contained in:
parent
1cc80986ed
commit
fd3d848520
|
@ -20,16 +20,16 @@ export default {
|
||||||
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
// localhost:8000/api/** -> https://preview.pro.ant.design/api/**
|
||||||
'/api/': {
|
'/api/': {
|
||||||
// 要代理的地址
|
// 要代理的地址
|
||||||
// target: 'http://172.20.32.181:31205',
|
target: 'http://172.20.32.181:31213', // 开发环境
|
||||||
target: 'http://172.20.32.98:8082',
|
// target: 'http://172.20.32.98:8082',
|
||||||
// target: 'http://172.20.32.150:8082',
|
// target: 'http://172.20.32.150:8082',
|
||||||
// 配置了这个可以从 http 代理到 https
|
// 配置了这个可以从 http 代理到 https
|
||||||
// 依赖 origin 的功能可能需要这个,比如 cookie
|
// 依赖 origin 的功能可能需要这个,比如 cookie
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: { '^/api': '' },
|
// pathRewrite: { '^/api': '' },
|
||||||
},
|
},
|
||||||
'/profile/avatar/': {
|
'/profile/avatar/': {
|
||||||
target: 'http://172.20.32.181:31205',
|
target: 'http://172.20.32.181:31213',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -193,6 +193,7 @@ export function render(oldRender: () => void) {
|
||||||
oldRender();
|
oldRender();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
|
setRemoteMenu([]);
|
||||||
oldRender();
|
oldRender();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -49,7 +49,7 @@
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 30px;
|
right: 30px;
|
||||||
bottom: 20px;
|
bottom: 20px;
|
||||||
z-index: 999;
|
z-index: 99;
|
||||||
width: 64px;
|
width: 64px;
|
||||||
height: 64px;
|
height: 64px;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { MenuDataItem } from '@ant-design/pro-components';
|
||||||
import { request } from '@umijs/max';
|
import { request } from '@umijs/max';
|
||||||
import React, { lazy } from 'react';
|
import React, { lazy } from 'react';
|
||||||
|
|
||||||
let remoteMenu: any = [];
|
let remoteMenu: any = null;
|
||||||
|
|
||||||
export function getRemoteMenu() {
|
export function getRemoteMenu() {
|
||||||
return remoteMenu;
|
return remoteMenu;
|
||||||
|
|
Loading…
Reference in New Issue