From b6ae7e4664faeb443b3b46b8a13bad9efa27d1e1 Mon Sep 17 00:00:00 2001 From: TZW <921914419@qq.com> Date: Mon, 9 Jan 2023 10:40:01 +0800 Subject: [PATCH] 19 --- config/proxy.js | 3 ++- src/components/PremButton/index.jsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/proxy.js b/config/proxy.js index e46e691..c0c300e 100644 --- a/config/proxy.js +++ b/config/proxy.js @@ -13,7 +13,8 @@ export default { dev: { [defaultSetting.proxypath]: { // è¦ä»£ç†çš„åœ°å€ - target: 'http://192.168.40.64:28000', //jfå“¥ + target: 'http://192.168.40.64:28001', //jfå“¥ + // target: 'http://192.168.40.64:28000', //gcå“¥ // target: 'http://192.168.40.203:8000', //djå“¥ changeOrigin: true, }, diff --git a/src/components/PremButton/index.jsx b/src/components/PremButton/index.jsx index 1157157..16f2acb 100644 --- a/src/components/PremButton/index.jsx +++ b/src/components/PremButton/index.jsx @@ -4,11 +4,11 @@ import { useModel } from '@umijs/max'; function PremButton(props) { const { initialState, setInitialState } = useModel('@@initialState'); - let buttonPerm = initialState.newMenu.buttonPerm; + let buttonPerm = initialState?.newMenu?.buttonPerm; const { children, btn, pop, access } = props; let res = buttonPerm && buttonPerm.length > 0 - ? buttonPerm.filter((it) => it.typeName == access && it.show == 1) + ? buttonPerm?.filter((it) => it.typeName == access && it.show == 1) : []; let accesses = access ? res.map((it) => it.typeName).includes(access) : true; //é…置按钮æƒé™æŽ¥å£ -- 2.21.0