PBUser.h 918 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // PBUser.h
  3. // PBSDK
  4. //
  5. // Created by mbp on 2024/12/13.
  6. //
  7. #import <Foundation/Foundation.h>
  8. NS_ASSUME_NONNULL_BEGIN
  9. @interface PBUser : NSObject <NSCoding>
  10. + (PBUser *)shared;
  11. @property (nonatomic, copy ) NSString *userId;
  12. @property (nonatomic, copy ) NSString *userCode;
  13. @property (nonatomic, copy ) NSString *userName;
  14. @property (nonatomic, copy ) NSString *nickName;
  15. @property (nonatomic, copy ) NSString *gender;
  16. @property (nonatomic, assign) NSInteger age;
  17. @property (nonatomic, copy ) NSString *icon;
  18. @property (nonatomic, copy ) NSString *imUserName;
  19. @property (nonatomic, copy ) NSString *imPassword;
  20. //登录
  21. + (void)loginWithMap:(NSDictionary*)dic;
  22. // 保存用户信息到 UserDefaults
  23. - (void)saveToUserDefaults;
  24. // 从 UserDefaults 加载用户信息
  25. + (void)loadFromUserDefaults;
  26. // 清除 UserDefaults 中的用户信息
  27. + (void)clearUserDefaults;
  28. @end
  29. NS_ASSUME_NONNULL_END