Browse Source

func 函数重写

dev
yuan_yi 3 years ago
parent
commit
22630d2124
  1. 2
      code/VideoAccess-VCMP/web/client/src/sections/example/actions/example.js
  2. 2
      code/VideoAccess-VCMP/web/client/src/sections/example/containers/example.jsx
  3. 19
      code/VideoAccess-VCMP/web/client/src/utils/func.js

2
code/VideoAccess-VCMP/web/client/src/sections/example/actions/example.js

@ -3,7 +3,7 @@
import { basicAction } from '@peace/utils'
import { ApiTable } from '$utils'
export function getMembers(orgId) {
export function getMembers (orgId) {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,

2
code/VideoAccess-VCMP/web/client/src/sections/example/containers/example.jsx

@ -1,7 +1,7 @@
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
import { Spin, Card } from '@douyinfe/semi-ui';
import '../style.less'
const { Meta } = Card;
const Example = (props) => {

19
code/VideoAccess-VCMP/web/client/src/utils/func.js

@ -1,13 +1,10 @@
'use strict';
export default class Func {
static isAuthorized(authcode) {
if (JSON.parse(sessionStorage.getItem('user'))) {
const { resources } = JSON.parse(sessionStorage.getItem('user'));
return resources.includes(authcode);
}else{
return false;
}
}
}
export const isAuthorized = (authcode) => {
if (JSON.parse(sessionStorage.getItem('user'))) {
const { resources } = JSON.parse(sessionStorage.getItem('user'));
return resources.includes(authcode);
} else {
return false;
}
}
Loading…
Cancel
Save