RQHTTPService+PostWxJsjpcode.m 902 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // RQHTTPService+PostWxJsjpcode.m
  3. // jiaPei
  4. //
  5. // Created by Ning.ge on 2025/3/31.
  6. // Copyright © 2025 JCZ. All rights reserved.
  7. //
  8. #import "RQHTTPService+PostWxJsjpcode.h"
  9. @implementation RQHTTPService (PostWxJsjpcode)
  10. /**
  11. 获取openid 判断是否绑定
  12. @param code
  13. @return Returns a signal which will send complete, or error.
  14. */
  15. - (RACSignal *)postWxWithjsjpcode:(NSString *)code {
  16. /// 1. 配置参数
  17. RQKeyedSubscript *subscript = [RQKeyedSubscript subscript];
  18. subscript[@"authorizationCode"] = code;
  19. /// 2. 配置参数模型
  20. RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:RQ_POST_Jsjpcode parameters:subscript.dictionary];
  21. /// 3.发起请求
  22. return [[[RQHTTPRequest requestWithParameters:paramters]
  23. enqueueResultClass:[NYJsCodeModel class]]
  24. rq_parsedResults];
  25. }
  26. @end