Browse Source

fix utils

release_0.0.1
yuan_yi 3 years ago
parent
commit
05e60fb524
  1. 6
      code/VideoAccess-VCMP/web/client/src/utils/func.js
  2. 4
      code/VideoAccess-VCMP/web/client/src/utils/index.js

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

@ -1,14 +1,10 @@
'use strict';
const isAuthorized = (authcode) => {
export const isAuthorized = (authcode) => {
if (JSON.parse(sessionStorage.getItem('user'))) {
const { resources } = JSON.parse(sessionStorage.getItem('user'));
return resources.includes(authcode);
} else {
return false;
}
}
export default{
isAuthorized
}

4
code/VideoAccess-VCMP/web/client/src/utils/index.js

@ -5,9 +5,9 @@ import { ApiTable, RouteTable } from './webapi'
export {
isAuthorized,
AuthorizationCode,
ApiTable,
RouteTable,
}
Loading…
Cancel
Save