From 6f07bde0496d13d33367db2a3e2109f9d89510e5 Mon Sep 17 00:00:00 2001 From: kai60 Date: Sat, 3 Jul 2021 22:27:05 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=B1sms=E5=88=87=E6=8D=A2=E9=98=BF?= =?UTF-8?q?=E9=87=8C=E7=9F=AD=E4=BF=A1=E9=AA=8C=E8=AF=81=E7=A0=81=EF=BC=8C?= =?UTF-8?q?=E5=8E=BB=E9=99=A4=E8=AF=AD=E9=9F=B3=E9=AA=8C=E8=AF=81=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Ifish.xcodeproj/project.pbxproj | 4 +- .../Utinitys/IfishHttpRequest/IFISHHttpTool.m | 3 +- .../BaseVIewContorller/BaseViewController.m | 2 +- .../ForgetViewController.m | 57 +++++++----- .../ForgetViewController.xib | 16 ++-- .../RegistViewController.mm | 92 +++++++++++-------- .../RegistViewController.xib | 18 ++-- 7 files changed, 113 insertions(+), 79 deletions(-) diff --git a/Ifish.xcodeproj/project.pbxproj b/Ifish.xcodeproj/project.pbxproj index 0499afb..8912fef 100644 --- a/Ifish.xcodeproj/project.pbxproj +++ b/Ifish.xcodeproj/project.pbxproj @@ -15817,7 +15817,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; @@ -15935,7 +15935,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 3; DEVELOPMENT_TEAM = WFX8GD5HFX; ENABLE_BITCODE = NO; ENABLE_TESTABILITY = YES; diff --git a/Ifish/Utinitys/IfishHttpRequest/IFISHHttpTool.m b/Ifish/Utinitys/IfishHttpRequest/IFISHHttpTool.m index 019dddf..2576636 100644 --- a/Ifish/Utinitys/IfishHttpRequest/IFISHHttpTool.m +++ b/Ifish/Utinitys/IfishHttpRequest/IFISHHttpTool.m @@ -185,7 +185,7 @@ addPhoneNumber:(NSString*)phoneNumber addSendType:(NSString*)sendType backData:(backVerifyCode)backVerifyCodeblock{ - [self timerFireWithTimerButton:timeBtn addPhoneNumber:phoneNumber timeBtnFinalTitle:@"语音验证码"]; + [self timerFireWithTimerButton:timeBtn addPhoneNumber:phoneNumber timeBtnFinalTitle:@"短信验证码"]; [self getverifyWithTimerButton:timeBtn addphoneNumber:phoneNumber AddSendType:sendType backData:backVerifyCodeblock]; } @@ -267,6 +267,7 @@ if ([reDic[@"result"] isEqualToString:@"100"]) { backVerifyCodeblock(verifyData); + [self showTitle:@"" messsage:@"验证码发送成功"]; }else if([reDic[@"result"] isEqualToString:@"101"]){ dispatch_source_cancel(_timer1); diff --git a/Ifish/controllers/BaseVIewContorller/BaseViewController.m b/Ifish/controllers/BaseVIewContorller/BaseViewController.m index f17b149..28e9b18 100644 --- a/Ifish/controllers/BaseVIewContorller/BaseViewController.m +++ b/Ifish/controllers/BaseVIewContorller/BaseViewController.m @@ -92,7 +92,7 @@ -(void)showTitle:(NSString*)title messsage:(NSString*)message{ UIAlertController *alertController = [UIAlertController alertControllerWithTitle:title message:message preferredStyle:UIAlertControllerStyleAlert]; - UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { + UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { NSLog(@"cancel Action"); }]; [alertController addAction:cancelAction]; diff --git a/Ifish/controllers/logAddRegistController/ForgetViewController.m b/Ifish/controllers/logAddRegistController/ForgetViewController.m index aa7d798..81e7f68 100644 --- a/Ifish/controllers/logAddRegistController/ForgetViewController.m +++ b/Ifish/controllers/logAddRegistController/ForgetViewController.m @@ -118,12 +118,12 @@ [userdefult synchronize]; - [self getVerifycode]; + [self getAliVerify]; } -#pragma mark - 获取验证码新(SMS) +#pragma mark - 获取验证码新 -(void)getVerifycode{ @@ -135,7 +135,7 @@ } -#define mark - 获取阿里验证码 已去 +#define mark - 获取阿里验证码 使用中 -(void)getAliVerify{ @@ -202,25 +202,40 @@ return; } __weak typeof(self)weakSelf=self; - [SMSSDK commitVerificationCode:weakSelf.verifyTextFiled.text phoneNumber:weakSelf.phoneNumberFiled.text zone:weakSelf.areaCode result:^(NSError *error) { + if (_verifyData.length&&[self.verifyTextFiled.text isEqualToString:_verifyData]) + { - { - if (!error) - { - - NSLog(@"验证成功"); - ResetViewController*vc=[[ResetViewController alloc]init]; - [weakSelf.navigationController pushViewController:vc animated:YES]; - - } - else - { - NSLog(@"错误信息:%@",error); - NSString *str =@"验证码验证失败"; - [self.view makeToast:str]; - } - } - }]; + NSLog(@"验证成功"); + ResetViewController*vc=[[ResetViewController alloc]init]; + [weakSelf.navigationController pushViewController:vc animated:YES]; + + } + else + { + + NSString *str =@"验证码验证失败"; + [self.view makeToast:str]; + } + +// [SMSSDK commitVerificationCode:weakSelf.verifyTextFiled.text phoneNumber:weakSelf.phoneNumberFiled.text zone:weakSelf.areaCode result:^(NSError *error) { +// +// { +// if (!error) +// { +// +// NSLog(@"验证成功"); +// ResetViewController*vc=[[ResetViewController alloc]init]; +// [weakSelf.navigationController pushViewController:vc animated:YES]; +// +// } +// else +// { +// NSLog(@"错误信息:%@",error); +// NSString *str =@"验证码验证失败"; +// [self.view makeToast:str]; +// } +// } +// }]; } diff --git a/Ifish/controllers/logAddRegistController/ForgetViewController.xib b/Ifish/controllers/logAddRegistController/ForgetViewController.xib index 52e45b0..5ae4ff3 100644 --- a/Ifish/controllers/logAddRegistController/ForgetViewController.xib +++ b/Ifish/controllers/logAddRegistController/ForgetViewController.xib @@ -1,11 +1,9 @@ - - - - + + - + @@ -47,7 +45,7 @@ - @@ -87,7 +85,7 @@ - + @@ -102,7 +100,7 @@ - - -