| 1234567891011121314151617181920212223242526272829 |
- // 获取应用权限
- checkAuth (appname,auth) {
- // console.log(appname)
- try {
- let _haveAuth = true
-
- let modules = JSON.parse(sessionStorage.getItem('active_modules'))
-
- let apps = modules.apps
- // 获取当前应用数据
- let active_apps = apps.filter(item => {
- return item.name === appname
- })
- // 获取当前应用权限
- let auth_list = active_apps[0].meta.auth
- // 判断是否拥有权限
- _haveAuth = auth_list.some(item=>item.option === auth)
- return _haveAuth
-
- } catch (error) {
- }
-
-
- },
|