index.js 393 B

12345678910111213
  1. /* 操作权限验证
  2. * str 为权限字符 用于匹配操作角色的字符
  3. * str === performEvacuation 应急疏散操作权限
  4. * str === checkGentle 安全检查
  5. */
  6. export function controlsRestrictVerify(str) {
  7. if(str){
  8. let controlsRestrict = uni.getStorageSync('controlsRestrict');
  9. return controlsRestrict.indexOf(str) != -1;
  10. }else{
  11. return false
  12. }
  13. }