YMEditProfileAlbumCellViewModel.m 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // YMEditProfileAlbumCellViewModel.m
  3. // MSYOUPAI
  4. //
  5. // Created by YoMi on 2024/2/18.
  6. // Copyright © 2024 MS. All rights reserved.
  7. //
  8. #import "YMEditProfileAlbumCellViewModel.h"
  9. @interface YMEditProfileAlbumCellViewModel ()
  10. /** 是否添加Cell */
  11. @property (nonatomic, assign, readwrite) BOOL isAddCell;
  12. /** 网络相册 */
  13. @property (nonatomic, copy, readwrite) NSString *networkAlbum;
  14. /** 本地相册 */
  15. @property (nonatomic, strong, readwrite) UIImage *localAlbum;
  16. /** 是否隐藏审核标签 */
  17. @property (nonatomic, assign, readwrite) BOOL isHideUnderReviewLabel;
  18. /** 是否隐藏选择提示 */
  19. @property (nonatomic, assign, readwrite) BOOL isHideSelectTips;
  20. @end
  21. @implementation YMEditProfileAlbumCellViewModel
  22. - (void)ym_initialize{
  23. [super ym_initialize];
  24. self.isAddCell = [self.params boolValueForKey:@"isAddCell" defaultValue:NO];
  25. self.networkAlbum = [self.params stringValueForKey:@"networkAlbum" defaultValue:@""];
  26. if([[self.params allKeys] containsObject:@"localAlbum"]){
  27. if ([self.params[@"localAlbum"] isKindOfClass:[UIImage class]]) {
  28. self.localAlbum = self.params[@"localAlbum"];
  29. } else {
  30. self.localAlbum = nil;
  31. }
  32. } else {
  33. self.localAlbum = nil;
  34. }
  35. self.isHideUnderReviewLabel = [self.params boolValueForKey:@"isHideUnderReviewLabel" defaultValue:YES];
  36. self.isHideSelectTips = [self.params boolValueForKey:@"isHideSelectTips" defaultValue:YES];
  37. }
  38. @end