RQHTTPService+RQDeleteQuestionFavAll.m 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. //
  2. // RQHTTPService+RQDeleteQuestionFavAll.m
  3. // jiaPei
  4. //
  5. // Created by 张嵘 on 2022/8/23.
  6. // Copyright © 2022 JCZ. All rights reserved.
  7. //
  8. #import "RQHTTPService+RQDeleteQuestionFavAll.h"
  9. @implementation RQHTTPService (RQDeleteQuestionFavAll)
  10. /**
  11. 删除全部题目记录
  12. @param type 1是收藏,2是错题,3是排除的题
  13. @return Returns a signal which will send complete, or error.
  14. */
  15. - (RACSignal *)deleteQuestionFavAllWithType:(RQSaveFavQuestionType)type {
  16. /// 1. 配置参数
  17. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  18. subscript[@"user"] = RQObjectIsNil(RQ_USER_MANAGER.currentUser._id)? @0 : RQ_USER_MANAGER.currentUser._id;
  19. subscript[@"type"] = @(type);
  20. subscript[@"carType"] = RQ_YDTQuestion_Module.car_type;
  21. subscript[@"subject"] = RQ_YDTQuestion_Module.subjectStr;
  22. /// 2. 配置参数模型
  23. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:RQ_POST_DeleteQuestionFavAll parameters:subscript.dictionary];
  24. /// 3.发起请求
  25. return [[[RQHTTPRequest requestWithParameters:paramters]
  26. enqueueResultClass:RQBaseModel.class]
  27. rq_parsedResults];
  28. }
  29. @end