NYLIVideoDetailSubFooterCell.m 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. //
  2. // NYLIVideoDetailSubFooterCell.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2025/2/12.
  6. // Copyright © 2025 JCZ. All rights reserved.
  7. //
  8. #import "NYLIVideoDetailSubFooterCell.h"
  9. @interface NYLIVideoDetailSubFooterCell ()
  10. @property (nonatomic, readwrite, strong) NYLIVideoDetailSubFooterViewModel *viewModel;
  11. @end
  12. @implementation NYLIVideoDetailSubFooterCell
  13. #pragma mark - PublicMethods
  14. + (instancetype)cellWithTableView:(UITableView *)tableView {
  15. static NSString *ID = @"NYLIVideoDetailSubFooterCell";
  16. NYLIVideoDetailSubFooterCell *cell = [tableView dequeueReusableCellWithIdentifier:ID];
  17. if (!cell) {
  18. cell = [self rq_viewFromXib];
  19. cell.selectionStyle = UITableViewCellSelectionStyleNone;
  20. [cell.cross_btn addTarget:cell action:@selector(callActiondb:) forControlEvents:UIControlEventTouchUpInside];
  21. [cell.verticaldb_btn addTarget:cell action:@selector(callActiondb:) forControlEvents:UIControlEventTouchUpInside];
  22. }
  23. return cell;
  24. }
  25. - (void)bindViewModel:(NYLIVideoDetailSubFooterViewModel *)viewModel {
  26. // @weakify(self)
  27. // _viewModel = viewModel;
  28. }
  29. //跳转题库
  30. - (void)callActiondb:(UIButton *)btn {
  31. NSArray *arr = [[NY_YDT_FIVE_Question_Module getQuestionWithSubject:RQ_YDTQuestion_Module.subject exerciseType:RQExerciseType_Sequential_LI].rac_sequence.signal map:^id _Nullable(RQYDTQuestionModel *ydtQuestionModel) {
  32. return [RQExerciseModel exerciseModelWithRQYDTQuestionModel:ydtQuestionModel];
  33. }].toArray;
  34. if(btn.tag == 10){//竖
  35. RQExerciseViewModel *exerciseViewModel = [[RQExerciseViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
  36. RQHomePageCarTypeKey : @(RQ_YDTQuestion_Module.carType),
  37. RQHomePageSubjectTypeKey : @(RQ_YDTQuestion_Module.subject),
  38. RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
  39. RQViewModelIDKey : @"科一特训题",
  40. RQExerciseTypeKey : @(RQExerciseType_Sequential_LI),
  41. RQViewModelUtilKey : arr,
  42. }];
  43. [RQ_APPDELEGATE.services pushViewModel:exerciseViewModel animated:YES];
  44. }else{//横
  45. //显示真实考场
  46. NYExaminationViewModel *examinationViewModel = [[NYExaminationViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{
  47. RQHomePageCarTypeKey : @(RQ_YDTQuestion_Module.carType),
  48. RQHomePageSubjectTypeKey : @(RQ_YDTQuestion_Module.subject),
  49. RQHomeSubPageTypeKey : @(RQHomeSubPageType_SequentialPractice),
  50. RQViewModelIDKey : @"科一特训题",
  51. RQExerciseTypeKey : @(RQExerciseType_Sequential_LI),
  52. RQViewModelUtilKey : arr,
  53. }];
  54. examinationViewModel.km = RQ_YDTQuestion_Module.subjectStr.intValue;
  55. [RQ_APPDELEGATE.services pushViewModel:examinationViewModel animated:YES];
  56. }
  57. }
  58. #pragma mark - SystemMethods
  59. - (void)awakeFromNib {
  60. [super awakeFromNib];
  61. }
  62. - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
  63. [super setSelected:selected animated:animated];
  64. // Configure the view for the selected state
  65. }
  66. @end