// // RQHTTPService+RQVerificationSmsCode.m // YueXueChe // // Created by 张嵘 on 2019/1/14. // Copyright © 2019 RONG. All rights reserved. // #import "RQHTTPService+RQVerificationSmsCode.h" @implementation RQHTTPService (RQVerificationSmsCode) /** 验证码验证 @param mobile 用户登录账号 @param type 类型 1 注册验证码 2找回密码 3试学 @param code 验证码 @return Returns a signal which will send complete, or error */ - (RACSignal *)verificationSmsCodeWithMobile:(NSString *)mobile type:(RQSMSCodeType)type code:(NSString *)code { /// 1. 配置参数 RQKeyedSubscript *subscript = [RQKeyedSubscript subscript]; subscript[@"mobile"] = mobile; subscript[@"type"] = @(type); subscript[@"code"] = code; /// 2. 配置参数模型 RQURLParameters *paramters = [RQURLParameters urlParametersWithMethod:RQ_HTTTP_METHOD_POST path:@"" parameters:subscript.dictionary]; /// 3.发起请求 return [[[RQHTTPRequest requestWithParameters:paramters] enqueueResultClass:nil] rq_parsedResults]; } @end