123456789101112131415161718192021222324252627282930313233343536373839 |
- //
- // NYLIVipContentItemViewModel.m
- // jiaPei
- //
- // Created by Ning.ge on 2025/2/15.
- // Copyright © 2025 JCZ. All rights reserved.
- //
- #import "NYLIVipContentItemViewModel.h"
- @interface NYLIVipContentItemViewModel ()
- @property (nonatomic, readwrite, strong) RQTypeModel *typeModel;
- @property (nonatomic, readwrite, copy) NSString *contentStr;
- @end
- @implementation NYLIVipContentItemViewModel
- - (instancetype)initWithRQTypeModel:(RQTypeModel *)typeModel type:(NSInteger)type{
- if (self = [super init]) {
- self.typeModel = typeModel;
- self.type = type;
- CGFloat RQVipContentCellWidth = RQ_SCREEN_WIDTH - (2 * 16);
- CGFloat RQVipContentCellHeight = RQVipContentCellWidth * (580.f / 375.f);
- if(type==1){
- RQVipContentCellHeight = RQVipContentCellWidth * (380.f / 375.f);
- }else if(type==2){
- RQVipContentCellHeight = RQVipContentCellWidth * (280.f / 375.f);
- }
- else if(type==3){
- RQVipContentCellHeight = RQVipContentCellWidth * (400.f / 375.f);
- }
- self.itemSize = CGSizeMake(RQVipContentCellWidth, RQVipContentCellHeight);
- }
- return self;
- }
- - (NSString *)itemClassName {
- return @"NYLiVipContentNewCell02";
- }
- @end
|