UASLoginViewModel.m 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //
  2. // UASLoginViewModel.m
  3. // shiku_im
  4. //
  5. // Created by on 2017/11/10.
  6. //
  7. #import "UASLoginViewModel.h"
  8. @implementation UASLoginViewModel
  9. + (RACSignal *)singalForVerifyCodeWith:(NSString *)phoneNummber{
  10. RACReplaySubject *subject = [RACReplaySubject subject];
  11. NSMutableDictionary *para = [NSMutableDictionary dictionary];
  12. para[@"phone"] = phoneNummber;
  13. // para[@"type"] = @"sms";
  14. [[UASNetworkManager shareManager] request:yanzhengMessageSend method:POST parameters:para progress:nil success:^(NSURLSessionDataTask *task, id responseObject) {
  15. DLog(@"返回的rac数据是:::%@",responseObject);
  16. [subject sendNext:responseObject];
  17. [subject sendCompleted];
  18. } failure:^(NSURLSessionDataTask *task, NSError *error) {
  19. [subject sendError:error];
  20. }];
  21. return subject;
  22. // [[UASNetworkManager shareManager] HTTPPostWithUrl:url_users_verifycode
  23. // Parames:para
  24. // commplete:^(id result,NSInteger statusCode) {
  25. // [subject sendNext:result];
  26. // [subject sendCompleted];
  27. // }
  28. // failure:^(NSError *error,NSInteger errorCode) {
  29. // [subject sendError:error];
  30. // }];
  31. //aoddnicailaobinidcaodnqidanz,dnq,ncao hypbuyaishuoaaczz nbusigI简单adjdnvg g
  32. }
  33. @end