RQTeachSchoolVideoItemViewModel.m 775 B

12345678910111213141516171819202122232425262728
  1. //
  2. // RQTeachSchoolVideoItemViewModel.m
  3. // JiaPei
  4. //
  5. // Created by 张嵘 on 2023/4/13.
  6. //
  7. #import "RQTeachSchoolVideoItemViewModel.h"
  8. @implementation RQTeachSchoolVideoItemViewModel
  9. - (instancetype)init {
  10. if (self = [super init]) {
  11. CGFloat width = RQ_SCREEN_WIDTH - 32.f;
  12. self.itemSize = CGSizeMake(width, width * (239.f / 345.f));
  13. self.operation = ^{
  14. if (RQ_USER_MANAGER.isShouldLogin) {
  15. RQPlaceListViewModel *viewModel = [[RQPlaceListViewModel alloc] initWithServices:RQ_APPDELEGATE.services params:@{}];
  16. [RQ_APPDELEGATE.services pushViewModel:viewModel animated:YES];
  17. }
  18. };
  19. }
  20. return self;
  21. }
  22. - (NSString *)itemClassName {
  23. return @"RQTeachSchoolVideoCell";
  24. }
  25. @end