RQHTTPService+GetConfigKey.m 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // RQHTTPService+GetConfigKey.m
  3. // SDJK
  4. //
  5. // Created by 张嵘 on 2021/10/29.
  6. //
  7. #import "RQHTTPService+GetConfigKey.h"
  8. @implementation RQDictTypeModel
  9. @end
  10. @implementation RQHTTPService (GetConfigKey)
  11. /**
  12. @return Returns a signal which will send complete, or error.
  13. @param pathStr 路径(vip_price:原价 vip_price_original:售价)
  14. */
  15. - (RACSignal *)getConfigKeyWithPath:(NSString *)pathStr {
  16. /// 1. 配置参数
  17. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  18. /// 2. 配置参数模型
  19. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:[NSString stringWithFormat:@"%@/%@",RQ_GET_ConfigKey,pathStr] parameters:subscript.dictionary];
  20. /// 3.发起请求
  21. return [[[RQHTTPRequest requestWithParameters:paramters]
  22. enqueueResultClass:nil]
  23. rq_parsedResults];
  24. }
  25. /**
  26. @return Returns a signal which will send complete, or error.
  27. @param pathStr 路径
  28. */
  29. - (RACSignal *)getDictTypeWithPath:(NSString *)pathStr {
  30. /// 1. 配置参数
  31. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  32. /// 2. 配置参数模型
  33. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_GET path:[NSString stringWithFormat:@"%@/%@",RQ_GET_DictType,pathStr] parameters:subscript.dictionary];
  34. /// 3.发起请求
  35. return [[[RQHTTPRequest requestWithParameters:paramters]
  36. enqueueResultClass:RQDictTypeModel.class]
  37. rq_parsedResults];
  38. }
  39. @end