Commit b6ae7e46 authored by TZW's avatar TZW

19

parent 9a68e5d9
...@@ -13,7 +13,8 @@ export default { ...@@ -13,7 +13,8 @@ export default {
dev: { dev: {
[defaultSetting.proxypath]: { [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哥 // target: 'http://192.168.40.203:8000', //dj哥
changeOrigin: true, changeOrigin: true,
}, },
......
...@@ -4,11 +4,11 @@ import { useModel } from '@umijs/max'; ...@@ -4,11 +4,11 @@ import { useModel } from '@umijs/max';
function PremButton(props) { function PremButton(props) {
const { initialState, setInitialState } = useModel('@@initialState'); const { initialState, setInitialState } = useModel('@@initialState');
let buttonPerm = initialState.newMenu.buttonPerm; let buttonPerm = initialState?.newMenu?.buttonPerm;
const { children, btn, pop, access } = props; const { children, btn, pop, access } = props;
let res = let res =
buttonPerm && buttonPerm.length > 0 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; let accesses = access ? res.map((it) => it.typeName).includes(access) : true;
//配置按钮权限接口 //配置按钮权限接口
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment