RQHTTPService+RQGetCode.m 845 B

12345678910111213141516171819202122232425262728293031
  1. //
  2. // RQHTTPService+RQGetCode.m
  3. // BuckDriverStudent
  4. //
  5. // Created by 张嵘 on 2021/2/1.
  6. // Copyright © 2021 lee. All rights reserved.
  7. //
  8. #import "RQHTTPService+RQGetCode.h"
  9. @implementation RQHTTPService (RQGetCode)
  10. /**
  11. 注册报名获取短信验证码
  12. @param telephone 手机号码
  13. @return Returns a signal which will send complete, or error.
  14. */
  15. - (RACSignal *)getCodeWithTelePhone:(NSString *)telephone {
  16. /// 1. 配置参数
  17. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  18. subscript[@"tel"] = telephone;
  19. /// 2. 配置参数模型
  20. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:RQ_POST_Code parameters:subscript.dictionary];
  21. /// 3.发起请求
  22. return [[[RQHTTPRequest requestWithParameters:paramters]
  23. enqueueResultClass:nil]
  24. rq_parsedResults];
  25. }
  26. @end