NYLIVipContentNewItemViewModel.m 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // NYLIVipContentNewItemViewModel.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2025/2/6.
  6. // Copyright © 2025 JCZ. All rights reserved.
  7. //
  8. #import "NYLIVipContentNewItemViewModel.h"
  9. @interface NYLIVipContentNewItemViewModel ()
  10. @property (nonatomic, readwrite, strong) RQTypeModel *typeModel;
  11. @property (nonatomic, readwrite, copy) NSString *contentStr;
  12. @end
  13. @implementation NYLIVipContentNewItemViewModel
  14. - (instancetype)initWithRQTypeModel:(RQTypeModel *)typeModel type:(int)type{
  15. if (self = [super init]) {
  16. self.typeModel = typeModel;
  17. self.type = type;
  18. CGFloat RQVipContentCellWidth = RQ_SCREEN_WIDTH;
  19. CGFloat RQVipContentCellHeight = RQVipContentCellWidth * (580.f / 375.f);
  20. if(type==1){
  21. RQVipContentCellHeight = RQVipContentCellWidth * (380.f / 375.f);
  22. }else if(type==2){
  23. RQVipContentCellHeight = RQVipContentCellWidth * (280.f / 375.f);
  24. }
  25. else if(type==3){
  26. RQVipContentCellHeight = RQVipContentCellWidth * (400.f / 375.f);
  27. }
  28. self.itemSize = CGSizeMake(RQVipContentCellWidth, RQVipContentCellHeight);
  29. }
  30. return self;
  31. }
  32. - (NSString *)itemClassName {
  33. return @"NYLiVipContentNewCell01";
  34. }
  35. @end