|
|
|
@ -234,23 +234,25 @@
@@ -234,23 +234,25 @@
|
|
|
|
|
[UICommon MessageUpload:@"加载中"]; |
|
|
|
|
if (self.isViewType != 2) |
|
|
|
|
{ |
|
|
|
|
[SMSSDK commitVerificationCode:weakSelf.codeField.text phoneNumber:weakSelf.emailField.text zone:@"86" result:^(NSError *error) { |
|
|
|
|
if (!error) |
|
|
|
|
{ |
|
|
|
|
[self UserRegisterUp]; |
|
|
|
|
} else |
|
|
|
|
{ |
|
|
|
|
[UICommon HidenLoading]; |
|
|
|
|
[UICommon MessageErrorText:@"验证码验证失败"]; |
|
|
|
|
self.registerBtn.enabled = YES; |
|
|
|
|
} |
|
|
|
|
}]; |
|
|
|
|
// [SMSSDK commitVerificationCode:weakSelf.codeField.text phoneNumber:weakSelf.emailField.text zone:@"86" result:^(NSError *error) { |
|
|
|
|
// if (!error) |
|
|
|
|
// { |
|
|
|
|
// [self UserRegisterUp]; |
|
|
|
|
// } else |
|
|
|
|
// { |
|
|
|
|
// [UICommon HidenLoading]; |
|
|
|
|
// [UICommon MessageErrorText:@"验证码验证失败"]; |
|
|
|
|
// self.registerBtn.enabled = YES; |
|
|
|
|
// } |
|
|
|
|
// }]; |
|
|
|
|
[self UserRegisterUp]; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
NSMutableDictionary *parameters = self.authInfo; |
|
|
|
|
[parameters setValue:self.emailField.text forKey:@"phone"]; |
|
|
|
|
[parameters setValue:self.passIField.text forKey:@"password"]; |
|
|
|
|
[parameters setValue:self.codeField.text forKey:@"code"]; |
|
|
|
|
[[[APIManager sharedManager] APPOST:WechatLogin_URL parameters:parameters isJson:YES resultClass:LoginModel.class] subscribeNext:^(id _Nullable x) { |
|
|
|
|
[UICommon HidenLoading]; |
|
|
|
|
NSMutableDictionary *userDic = [NSMutableDictionary dictionary]; |
|
|
|
@ -272,11 +274,13 @@
@@ -272,11 +274,13 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// 注册/忘记密码 |
|
|
|
|
- (void)UserRegisterUp |
|
|
|
|
{ |
|
|
|
|
NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
|
|
|
|
[parameters setValue:self.emailField.text forKey:@"phone"]; |
|
|
|
|
[parameters setValue:self.passIField.text forKey:@"password"]; |
|
|
|
|
[parameters setValue:self.codeField.text forKey:@"code"]; |
|
|
|
|
[[[APIManager sharedManager] APPOST:self.isViewType == 0 ? Register_URL : UpdatePwd_URL parameters:parameters isJson:YES resultClass:nil] subscribeNext:^(id _Nullable x) { |
|
|
|
|
if (self.isViewType == 0) |
|
|
|
|
{ |
|
|
|
@ -314,30 +318,29 @@
@@ -314,30 +318,29 @@
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
[UICommon MessageUpload:@"加载中"]; |
|
|
|
|
// NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
|
|
|
|
// [parameters setValue:self.emailField.text forKey:@"email"]; |
|
|
|
|
// [parameters setValue:self.isViewType == 0 ? @(1) : @(2) forKey:@"type"]; |
|
|
|
|
// [[[APIManager sharedManager] APGET:EmailCode_URL parameters:parameters resultClass:nil] subscribeNext:^(id _Nullable x) { |
|
|
|
|
// [UICommon MessageSuccessText:@"获取验证码成功"]; |
|
|
|
|
// [self timeOutCount]; |
|
|
|
|
// |
|
|
|
|
// } error:^(NSError * _Nullable error) { |
|
|
|
|
// NSDictionary *dic = error.userInfo; |
|
|
|
|
// [UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]]; |
|
|
|
|
// }]; |
|
|
|
|
[SMSSDK getVerificationCodeByMethod:SMSGetCodeMethodSMS phoneNumber:self.emailField.text zone:@"86" template:@"" result:^(NSError *error) { |
|
|
|
|
[UICommon HidenLoading]; |
|
|
|
|
if (!error) |
|
|
|
|
{ |
|
|
|
|
[UICommon MessageSuccessText:@"获取验证码成功"]; |
|
|
|
|
[self timeOutCount]; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
NSDictionary *dic = error.userInfo; |
|
|
|
|
[UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]]; |
|
|
|
|
} |
|
|
|
|
NSMutableDictionary *parameters = [NSMutableDictionary dictionary]; |
|
|
|
|
[parameters setValue:self.emailField.text forKey:@"phoneNum"]; |
|
|
|
|
[[[APIManager sharedManager] APGET:EmailCode_URL parameters:parameters resultClass:nil] subscribeNext:^(id _Nullable x) { |
|
|
|
|
[UICommon MessageSuccessText:@"获取验证码成功"]; |
|
|
|
|
[self timeOutCount]; |
|
|
|
|
|
|
|
|
|
} error:^(NSError * _Nullable error) { |
|
|
|
|
NSDictionary *dic = error.userInfo; |
|
|
|
|
[UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]]; |
|
|
|
|
}]; |
|
|
|
|
// [SMSSDK getVerificationCodeByMethod:SMSGetCodeMethodSMS phoneNumber:self.emailField.text zone:@"86" template:@"" result:^(NSError *error) { |
|
|
|
|
// [UICommon HidenLoading]; |
|
|
|
|
// if (!error) |
|
|
|
|
// { |
|
|
|
|
// [UICommon MessageSuccessText:@"获取验证码成功"]; |
|
|
|
|
// [self timeOutCount]; |
|
|
|
|
// } |
|
|
|
|
// else |
|
|
|
|
// { |
|
|
|
|
// NSDictionary *dic = error.userInfo; |
|
|
|
|
// [UICommon MessageErrorText:dic[NSLocalizedDescriptionKey]]; |
|
|
|
|
// } |
|
|
|
|
// }]; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|