// // RQVideoDetailViewModel.m // JSJP // // Created by 张嵘 on 2021/10/26. // #import "RQVideoDetailViewModel.h" @interface RQVideoDetailViewModel () @property (nonatomic, readwrite, strong) RQTreeListModel *treeListModel; @property (nonatomic, readwrite, strong) RQPlaceVideoListModel *placeVideoListModel; @property (nonatomic, readwrite, assign) NSInteger index; @property (nonatomic, readwrite, strong) NSIndexPath *indexPath; @property (nonatomic, readwrite, assign) RQHomePageSubjectType homePageSubjectType; @property (nonatomic, readwrite, strong) VideosItem *videosItem; @end @implementation RQVideoDetailViewModel #pragma mark - Public Method - (instancetype)initWithServices:(id)services params:(NSDictionary *)params { if (self = [super initWithServices:services params:params]) { if ([params[RQViewModelUtilKey] isKindOfClass:[RQPlaceVideoListModel class]]) { self.placeVideoListModel = params[RQViewModelUtilKey]; } else { self.treeListModel = params[RQViewModelUtilKey]; } self.index = [params[RQVideoItemIndexKey] integerValue]; self.indexPath = params[RQVideoItemIndexPathKey]; self.homePageSubjectType = [params[RQHomePageSubjectTypeKey] integerValue]; self.videosItem = params[RQPlayVideoItemKey]; } return self; } - (void)initialize { [super initialize]; self.prefersNavigationBarHidden = YES; } @end