123456789101112131415161718192021222324 |
- /* 操作权限验证
- * str 为权限字符 用于匹配操作角色的字符
- * str === performEvacuation 应急疏散操作权限
- * str === checkGentle 安全检查
- */
- export function controlsRestrictVerify(str) {
- if(str){
- let controlsRestrict = uni.getStorageSync('controlsRestrict');
- return controlsRestrict.indexOf(str) != -1;
- }else{
- return false
- }
- }
- /* 页面权限验证
- * str 为权限字符 用于匹配操作角色的字符
- */
- export function pageRestrictVerify(str) {
- if(str){
- let permissions = uni.getStorageSync('permissions')+'';
- return permissions.indexOf(str) != -1;
- }else{
- return false
- }
- }
|