NYFailSpecialExerciseItemModel.m 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // NYFailSpecialExerciseItemModel.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2024/12/11.
  6. // Copyright © 2024 JCZ. All rights reserved.
  7. //
  8. #import "NYFailSpecialExerciseItemModel.h"
  9. @implementation NYFailSpecialExerciseItemModel
  10. - (instancetype)init {
  11. if (self = [super init]) {
  12. self.itemSize = CGSizeMake((RQ_SCREEN_WIDTH/3.0)-20.f, RQ_FIT_HORIZONTAL(100));
  13. }
  14. return self;
  15. }
  16. - (NSString *)itemClassName {
  17. return @"NYFailSpecialExerciseCell";
  18. }
  19. - (nonnull instancetype)initWithTitle:(nonnull NSString *)title icon:(nonnull NSString *)icon {
  20. if (self = [self init]) {
  21. self.title = title;
  22. self.icon = icon;
  23. self.operation = ^{
  24. NSLog(@"%@点击了",title);
  25. if (RQ_USER_MANAGER.isLogin) {
  26. NYFailSpecialExerciseDetailsViewModel *failSpecialExerciseDetailsViewModel = [[NYFailSpecialExerciseDetailsViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
  27. RQHomePageSubjectTypeKey : @(RQ_YDTQuestion_Module.carType),
  28. RQHomePageSpTitleKey : title,
  29. }];
  30. [RQ_APPDELEGATE.services pushViewModel:failSpecialExerciseDetailsViewModel animated:YES];
  31. }
  32. };
  33. }
  34. return self;
  35. }
  36. @end