Browse Source

feat: 代理先隐藏绑定设备

lihao
nili 6 months ago
parent
commit
d37f5ada80
  1. 2
      dist/index.html
  2. 140
      dist/umi.19d06816.js
  3. 2
      src/access.ts
  4. 4
      src/app.tsx

2
dist/index.html

@ -11,6 +11,6 @@
</head> </head>
<body> <body>
<div id="root"></div> <div id="root"></div>
<script src="/umi.a9af9b44.js"></script> <script src="/umi.19d06816.js"></script>
</body> </body>
</html> </html>

140
dist/umi.a9af9b44.js → dist/umi.19d06816.js

File diff suppressed because one or more lines are too long

2
src/access.ts

@ -6,7 +6,7 @@ export default function access(initialState: { currentUser?: API.MatrixAdmin } |
let data = { let data = {
canAdmin: currentUser && currentUser.role && currentUser.role <= 3, canAdmin: currentUser && currentUser.role && currentUser.role <= 3,
superAdmin: currentUser && currentUser.role && currentUser.role === 1, superAdmin: currentUser && currentUser.role && currentUser.role === 1,
canDeviceOwner: currentUser && currentUser.role && currentUser.role > 3, canDeviceOwner: currentUser && currentUser.role && currentUser.role === 4,
}; };
return data; return data;
} }

4
src/app.tsx

@ -1,16 +1,16 @@
import { AvatarDropdown, AvatarName, Question, SelectLang } from '@/components'; import { AvatarDropdown, AvatarName, Question, SelectLang } from '@/components';
import { current } from '@/services/matrix/admin';
import { LinkOutlined } from '@ant-design/icons'; import { LinkOutlined } from '@ant-design/icons';
import { MenuDataItem, SettingDrawer } from '@ant-design/pro-components'; import { MenuDataItem, SettingDrawer } from '@ant-design/pro-components';
import { Link, history } from '@umijs/max'; import { Link, history } from '@umijs/max';
import { appList } from '@/services/matrix/admin';
import type { Settings as LayoutSettings } from '@ant-design/pro-components'; import type { Settings as LayoutSettings } from '@ant-design/pro-components';
import type { RunTimeLayoutConfig } from '@umijs/max'; import type { RunTimeLayoutConfig } from '@umijs/max';
import { JSXElementConstructor, ReactElement, ReactNode, ReactPortal } from 'react'; import { JSXElementConstructor, ReactElement, ReactNode, ReactPortal } from 'react';
import defaultSettings from '../config/defaultSettings'; import defaultSettings from '../config/defaultSettings';
import access from './access'; import access from './access';
import { errorConfig } from './requestErrorConfig'; import { errorConfig } from './requestErrorConfig';
import { appList, current } from './services/matrix/admin';
const isDev = process.env.NODE_ENV === 'development'; const isDev = process.env.NODE_ENV === 'development';
const loginPath = '/user/login'; const loginPath = '/user/login';

Loading…
Cancel
Save