Browse Source

func 函数重写

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

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

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

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

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