RQHTTPService+RQGetPlaceVideoList.m 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. //
  2. // RQHTTPService+RQGetPlaceVideoList.m
  3. // JiaPei
  4. //
  5. // Created by 张嵘 on 2023/4/13.
  6. //
  7. #import "RQHTTPService+RQGetPlaceVideoList.h"
  8. @implementation RQPlaceVideoListModel
  9. @end
  10. @implementation RQHTTPService (RQGetPlaceVideoList)
  11. /**
  12. 查询考场视频列表
  13. @param pageNum 当前页码
  14. @param pageSize 每页数据量
  15. @param searchStr 搜索关键字
  16. @return Returns a signal which will send complete, or error.
  17. */
  18. - (RACSignal *)getPlaceVideoListWithPageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize searchString:(NSString *)searchStr examId:(NSString*)examId {
  19. /// 1. 配置参数
  20. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  21. if (pageNum != 0 && pageSize != 0) {
  22. /// 当前页码
  23. subscript[@"pageNum"] = @(pageNum);
  24. /// 每页数据量
  25. subscript[@"pageSize"] = @(pageSize);
  26. }
  27. //后端说不用
  28. // if (RQStringIsNotEmpty(searchStr)) {
  29. // /// 考场名称
  30. // subscript[@"examName"] = searchStr;
  31. // }
  32. /// 0未开启 1已开启
  33. subscript[@"state"] = @1;
  34. /// 城市ID
  35. subscript[@"cityId"] = RQ_USER_MANAGER.currentUser.city;
  36. /// id
  37. // subscript[@"id"] = @0;
  38. /// 考场编号
  39. subscript[@"examId"] = examId;
  40. /// 视频方向 0:竖 1:横
  41. // subscript[@"horizontal"] = @1;
  42. /// 1:科目一 2:科目二 3:科目三 4:科目四
  43. subscript[@"videoSubject"] = @(3);
  44. /// 视频地址
  45. // subscript[@"videoUrl"] = @"";
  46. /// 视频名称
  47. // subscript[@"videoName"] = @"";
  48. /// 视频封面
  49. // subscript[@"videoCover"] = @"";
  50. /// 2. 配置参数模型
  51. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path: RQ_GET_PlaceVideoList parameters:subscript.dictionary];
  52. /// 3.发起请求
  53. return [[[RQHTTPRequest requestWithParameters:paramters]
  54. enqueueResultClass:[RQPlaceVideoListModel class]]
  55. rq_parsedResults];
  56. }
  57. @end