authorize.js 505 B

1234567891011121314151617181920
  1. const authorize = function () {
  2. let realName = wx.getStorageSync('REAL_NAME')
  3. let lock = wx.getStorageSync('LOCK')
  4. if (realName && realName === true) {
  5. if (lock && lock === true) {
  6. wx.showToast({
  7. title: '当前用户被锁定,请联系管理员',
  8. icon: "none",
  9. duration: 3000
  10. })
  11. return 2
  12. } else {
  13. return 0
  14. }
  15. } else {
  16. return 1
  17. }
  18. }
  19. export default authorize