Commit 33bc6e7a authored by 邢超's avatar 邢超

区分活体和短验

parent 44c8e0f2
...@@ -14,6 +14,10 @@ ...@@ -14,6 +14,10 @@
@property (nonatomic, copy)NSString *token; @property (nonatomic, copy)NSString *token;
/// 重置密码类型 “body”:活体,“code”:短信 /// 重置密码类型 “body”:活体,“code”:短信
@property (nonatomic, copy)NSString *resetType; @property (nonatomic, copy)NSString *resetType;
///身份证号
@property (nonatomic, copy)NSString *idCard;
///姓名
@property (nonatomic, copy)NSString *name;
@end @end
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
//创建header //创建header
UILabel *titleLable = [UILabel creatLabelWithSuperView:self.tableHeaderView title:@"短信验证成功,请设置新登录密码" titleFontSize:[UIFont qg_mediumFontOfSize:18] textColor:[UIColor textColor3333] alignment:NSTextAlignmentLeft]; UILabel *titleLable = [UILabel creatLabelWithSuperView:self.tableHeaderView title:@"短信验证成功,请设置新登录密码" titleFontSize:[UIFont qg_mediumFontOfSize:18] textColor:[UIColor textColor3333] alignment:NSTextAlignmentLeft];
//如果是活体认证修改密码
if ([self.resetType isEqualToString:@"body"]) { if ([self.resetType isEqualToString:@"body"]) {
titleLable.text = @"刷脸验证成功,请设置新登录密码"; titleLable.text = @"刷脸验证成功,请设置新登录密码";
} }
...@@ -64,11 +65,26 @@ ...@@ -64,11 +65,26 @@
return; return;
} }
//请求连接根据短信或者活体验证
NSString *url;
NSMutableDictionary *parame = [[NSMutableDictionary alloc]init]; NSMutableDictionary *parame = [[NSMutableDictionary alloc]init];
[parame setObject:self.firstPassword forKey:@"password"]; [parame setObject:self.firstPassword forKey:@"password"];
//此处区分短验和活体 if ([self.resetType isEqualToString:@"body"]) {
NSString *url = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:([self.resetType isEqualToString:@"code"]?QGLoginRequestServerMethodSetNewPasswordCode:QGLoginRequestServerMethodSetNewPasswordBody)]; [parame setObject:self.phoneNumberStr forKey:@"phone"];
[parame setObject:self.name forKey:@"name"];
[parame setObject:self.idCard forKey:@"idCard"];
//活体
url = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodSetNewPasswordBody];
}else{
//短验
url = [QGLoginRequestApi urlWithQGLoginRequestServerMethod:QGLoginRequestServerMethodSetNewPasswordCode];
}
NSMutableDictionary *header = [[NSMutableDictionary alloc] initWithCapacity:1]; NSMutableDictionary *header = [[NSMutableDictionary alloc] initWithCapacity:1];
if (![QGUserInfo sharedUserInfo].login) { if (![QGUserInfo sharedUserInfo].login) {
...@@ -229,7 +245,8 @@ ...@@ -229,7 +245,8 @@
self.phoneNumberStr = [param objectForKey:@"phoneNumberStr"]; self.phoneNumberStr = [param objectForKey:@"phoneNumberStr"];
self.token = [param objectForKey:@"token"]; self.token = [param objectForKey:@"token"];
self.resetType = [param objectForKey:@"resetType"]; self.resetType = [param objectForKey:@"resetType"];
self.name = [param objectForKey:@"name"];
self.idCard = [param objectForKey:@"idCard"];
} }
@end @end
...@@ -147,10 +147,20 @@ ...@@ -147,10 +147,20 @@
msg = success; msg = success;
} }
*/ */
@weakify(self); @weakify(self);
self.megliveSuccessBlock = ^(NSDictionary * _Nonnull successDic) { self.megliveSuccessBlock = ^(NSDictionary * _Nonnull successDic) {
@strongify(self); @strongify(self);
[Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGSucceedRetrieceSetNewPasswordViewController] parameters:@{@"phoneNumberStr":self.phoneNumberStr, @"token":[successDic valueForKeyPath:@"data.token"],@"resetType":@"body"} handlerBlock:self.callBackBlock]; NSMutableDictionary *parame = [[NSMutableDictionary alloc] init];
[parame setObject:self.identityCardNum forKey:@"idCard"];
[parame setObject:self.nameStr forKey:@"name"];
[parame setObject:self.phoneNumberStr forKey:@"phoneNumberStr"];
[parame setObject:@"body" forKey:@"resetType"];
[parame setObject:[successDic valueForKeyPath:@"data.token"] forKey:@"token"];
[Mediator performTarget:[QGMediatorClassTools QGClassNameWithHeaderType:QGHeaderTypeQGSucceedRetrieceSetNewPasswordViewController] parameters:parame handlerBlock:self.callBackBlock];
}; };
} }
...@@ -185,7 +195,7 @@ ...@@ -185,7 +195,7 @@
QGQGVerifyFaceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cardCell"]; QGQGVerifyFaceCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cardCell"];
if (!cell) { if (!cell) {
cell = [[QGQGVerifyFaceCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cardCell" cellTitle:@"身份证号" placeHolder:@"请输入本人18位身份证号"]; cell = [[QGQGVerifyFaceCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cardCell" cellTitle:@"身份证号" placeHolder:@"请输入本人身份证号"];
} }
@weakify(self) @weakify(self)
......
...@@ -95,7 +95,8 @@ ...@@ -95,7 +95,8 @@
- (void)userProtocol { - (void)userProtocol {
// NSString *url = [QGRequestCenter urlWithIndex:QGRequestServerMethodUserAgreement]; // NSString *url = [QGRequestCenter urlWithIndex:QGRequestServerMethodUserAgreement];
// [self pushWebViewControllerWithUrlString:url title:@"用户协议"]; // [self pushWebViewControllerWithUrlString:@"http://pages.xyqb.com/fa-lv-xie-yi/" title:@"用户协议"];
[self navigationToWeb:@"http://pages.xyqb.com/fa-lv-xie-yi/"];
} }
#pragma mark - UITableViewDataSource #pragma mark - UITableViewDataSource
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment