// // RQSimulationTestTopicsViewModel.m // SDJK // // Created by 张嵘 on 2021/8/6. // #import "RQSimulationTestTopicsViewModel.h" @interface RQSimulationTestTopicsViewModel () @property (nonatomic, readwrite, assign) RQExerciseType exerciseType; /// homePageCarType @property (nonatomic, readwrite, assign) RQHomePageCarType homePageCarType; /// homePageSubjectType @property (nonatomic, readwrite, assign) RQHomePageSubjectType homePageSubjectType; /// homeSubPageType @property (nonatomic, readwrite, assign) RQHomeSubPageType homeSubPageType; @end @implementation RQSimulationTestTopicsViewModel #pragma mark - Public Method - (instancetype)initWithServices:(id)services params:(NSDictionary *)params{ if (self = [super initWithServices:services params:params]) { self.exerciseType = [params[RQExerciseTypeKey] integerValue]; self.homePageCarType = [params[RQHomePageCarTypeKey] integerValue]; self.homePageSubjectType = [params[RQHomePageSubjectTypeKey] integerValue]; self.homeSubPageType = [params[RQHomeSubPageTypeKey] integerValue]; } return self; } - (void)initialize{ [super initialize]; self.prefersNavigationBarHidden = YES; self.prefersNavigationBarBottomLineHidden = YES; ///配置数据 [self rq_configureData]; } #pragma mark - PrivateMethod - (void)rq_configureData { /// 第零组 RQCommonGroupViewModel *group0 = [RQCommonGroupViewModel groupViewModel]; group0.headerHeight = CGFLOAT_MIN; group0.footerHeight = CGFLOAT_MIN; RQSimulationTestTopicsItemViewModel *simulationTestTopicsItemViewModel = [[RQSimulationTestTopicsItemViewModel alloc] init]; simulationTestTopicsItemViewModel.rowHeight = RQ_FIT_HORIZONTAL(400.f); simulationTestTopicsItemViewModel.homePageCarType = self.homePageCarType; simulationTestTopicsItemViewModel.homePageSubjectType = self.homePageSubjectType; simulationTestTopicsItemViewModel.homeSubPageType = self.homeSubPageType; simulationTestTopicsItemViewModel.exerciseType = self.exerciseType; simulationTestTopicsItemViewModel.operation = ^{ }; group0.itemViewModels = @[simulationTestTopicsItemViewModel]; self.dataSource = @[group0]; } @end