yuan_yi
3 years ago
3 changed files with 10 additions and 13 deletions
@ -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…
Reference in new issue