// // RQFreeTryNoteItemViewModel.m // SDJK // // Created by 张嵘 on 2022/6/28. // #import "RQFreeTryNoteItemViewModel.h" @implementation RQFreeTryNoteItemViewModel - (instancetype)initWithTitle:(NSString *)title icon:(NSString *)icon { self = [super init]; if (self) { self.title = title; self.icon = icon; CGFloat bgImageViewWidth = RQ_SCREEN_WIDTH - 32.f; self.rowHeight = bgImageViewWidth * (166.f / 345.f); if ([self.title isEqualToString:@"科目一体验"]) { self.operation = ^{ RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{ RQHomePageCarTypeKey : @(RQHomePageCarType_Car), RQHomePageSubjectTypeKey : @(RQHomePageSubjectType_SubjectOne), RQHomeSubPageTypeKey : @(RQHomeSubPageType_FreeTry), RQExerciseTypeKey : @(RQExerciseType_Sequential), RQViewCommonValueKey : @(0), }]; [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES]; }; } else if ([self.title isEqualToString:@"科目四体验"]) { self.operation = ^{ RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{ RQHomePageCarTypeKey : @(RQHomePageCarType_Car), RQHomePageSubjectTypeKey : @(RQHomePageSubjectType_SubjectFour), RQHomeSubPageTypeKey : @(RQHomeSubPageType_FreeTry), RQExerciseTypeKey : @(RQExerciseType_Sequential), RQViewCommonValueKey : @(0), }]; [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES]; }; } } return self; } - (NSString *)itemClassName { return @"RQFreeTryNoteCell"; } @end