12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- //
- // RQHTTPService+RQGetTreeList.m
- // jiaPei
- //
- // Created by 张嵘 on 2021/10/25.
- // Copyright © 2021 JCZ. All rights reserved.
- //
- #import "RQHTTPService+RQGetTreeList.h"
- @implementation RQHTTPService (RQGetTreeList)
- /**
- 查询教学视频分类树形列表
- @return Returns a signal which will send complete, or error.
- */
- - (RACSignal *)getTreeList {
- /// 1. 配置参数
- RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
- // subscript[@""] = @"";
-
- /// 2. 配置参数模型
- RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_TreeList parameters:subscript.dictionary];
-
- /// 3.发起请求
- return [[[RQHTTPRequest requestWithParameters:paramters]
- enqueueResultClass:[RQTreeListModel class]]
- rq_parsedResults];
- }
- /**
- 根据分类ID查询教学视频
- @param videoTypeId 分类ID
- @return Returns a signal which will send complete, or error.
- */
- - (RACSignal *)getTeachingVideoByTypeId:(NSInteger)videoTypeId {
- /// 1. 配置参数
- RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
- subscript[@"videoTypeId"] = [NSString stringWithFormat:@"%@",[NSNumber numberWithInteger:videoTypeId]];
-
- /// 2. 配置参数模型
- RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:RQ_GET_TeachingVideoByTypeId parameters:subscript.dictionary];
-
- /// 3.发起请求
- return [[[RQHTTPRequest requestWithParameters:paramters]
- enqueueResultClass:[VideosItem class]]
- rq_parsedResults];
- }
- @end
|