util.js 277 B

12345678910111213141516
  1. const utils = {
  2. getRoles: function(role) {
  3. let _roles = uni.getStorageSync('rolesList')
  4. for (let i = 0; i < _roles.length; i++) {
  5. if (_roles[i] == role) {
  6. return true
  7. }
  8. }
  9. return false
  10. },
  11. }
  12. module.exports = {
  13. getRoles: utils.getRoles,
  14. }