Commit 3e89b6be0f8aa00bc2b5b5e8a6d44e991a8a2910
1 parent
7249b72d
身份证
Showing
15 changed files
with
331 additions
and
177 deletions
CNLiveBPersonalVerificationModule.podspec
| @@ -113,6 +113,8 @@ s.subspec 'CNBPersonCardInfo' do |card| | @@ -113,6 +113,8 @@ s.subspec 'CNBPersonCardInfo' do |card| | ||
| 113 | card.dependency 'CNLiveCustomUI' | 113 | card.dependency 'CNLiveCustomUI' |
| 114 | ##用户库 | 114 | ##用户库 |
| 115 | card.dependency 'CNLiveUserManagement' | 115 | card.dependency 'CNLiveUserManagement' |
| 116 | + ##相册 | ||
| 117 | + card.dependency 'CNLiveImagePickerController' | ||
| 116 | # #网络请求 | 118 | # #网络请求 |
| 117 | card.dependency 'CNLiveRequestBastKit' | 119 | card.dependency 'CNLiveRequestBastKit' |
| 118 | card.dependency 'CNLiveEnvironment' | 120 | card.dependency 'CNLiveEnvironment' |
CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle/observer_idcard_own@2x.png
0 → 100644
4.11 KB
CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle/observer_idcard_own@3x.png
0 → 100644
7.87 KB
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/ApplyForShootController.h
| @@ -8,16 +8,6 @@ | @@ -8,16 +8,6 @@ | ||
| 8 | 8 | ||
| 9 | #import <UIKit/UIKit.h> | 9 | #import <UIKit/UIKit.h> |
| 10 | 10 | ||
| 11 | -@protocol ApplyForShootControllerDelegate <NSObject> | ||
| 12 | - | ||
| 13 | -- (void)completeRefresh; | ||
| 14 | - | ||
| 15 | -@end | ||
| 16 | - | ||
| 17 | @interface ApplyForShootController : UIViewController | 11 | @interface ApplyForShootController : UIViewController |
| 18 | 12 | ||
| 19 | -@property (nonatomic, weak) id <ApplyForShootControllerDelegate>delegate; | ||
| 20 | - | ||
| 21 | -- (instancetype)initWithIsMineVC:(BOOL)isMineVC; | ||
| 22 | - | ||
| 23 | @end | 13 | @end |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/ApplyForShootController.m
| @@ -25,27 +25,32 @@ | @@ -25,27 +25,32 @@ | ||
| 25 | #import "CNLiveBusinessTools.h" | 25 | #import "CNLiveBusinessTools.h" |
| 26 | #import "CNLiveEnvironment.h" | 26 | #import "CNLiveEnvironment.h" |
| 27 | #import "CNLiveIDCardAuthGetImage.h" | 27 | #import "CNLiveIDCardAuthGetImage.h" |
| 28 | -static NSString *shootCellId = @"shootCellId"; | ||
| 29 | -static NSString *confirmCellId = @"confirmCellId"; | 28 | +#import "CNBPersonalVerificationController.h" |
| 29 | +#import <CNLiveImagePickerController/TZImagePickerController.h> | ||
| 30 | +#import <CNLiveImagePickerController/TZImageManager.h> | ||
| 31 | +#import <CNLiveCommonCategory/CNLiveCommonCategory.h> | ||
| 30 | 32 | ||
| 31 | -@interface ApplyForShootController ()<UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource> | 33 | +@interface ApplyForShootController ()<UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource,UINavigationControllerDelegate, UIImagePickerControllerDelegate> |
| 32 | 34 | ||
| 33 | @property (nonatomic, strong) UITableView *tableView; | 35 | @property (nonatomic, strong) UITableView *tableView; |
| 34 | @property (nonatomic, strong) NSArray <AgreementModel*>*dataArray; | 36 | @property (nonatomic, strong) NSArray <AgreementModel*>*dataArray; |
| 35 | 37 | ||
| 36 | @property (nonatomic, strong) UIImage *fontImage; | 38 | @property (nonatomic, strong) UIImage *fontImage; |
| 37 | @property (nonatomic, strong) UIImage *backImage; | 39 | @property (nonatomic, strong) UIImage *backImage; |
| 40 | +@property (nonatomic, strong) UIImage *iconImage; | ||
| 38 | @property (nonatomic, strong) NSMutableArray *imageDatas; | 41 | @property (nonatomic, strong) NSMutableArray *imageDatas; |
| 39 | 42 | ||
| 40 | @property (nonatomic, copy) NSString *realName; | 43 | @property (nonatomic, copy) NSString *realName; |
| 41 | @property (nonatomic, copy) NSString *idCardNo; | 44 | @property (nonatomic, copy) NSString *idCardNo; |
| 45 | +@property (nonatomic, copy) NSString *address; | ||
| 42 | 46 | ||
| 43 | @property (nonatomic, assign) BOOL isFont; | 47 | @property (nonatomic, assign) BOOL isFont; |
| 44 | @property (nonatomic, assign) BOOL isDataSucc; | 48 | @property (nonatomic, assign) BOOL isDataSucc; |
| 45 | @property (nonatomic, assign) BOOL isFontSucc; | 49 | @property (nonatomic, assign) BOOL isFontSucc; |
| 46 | @property (nonatomic, assign) BOOL isBackSucc; | 50 | @property (nonatomic, assign) BOOL isBackSucc; |
| 47 | -@property (nonatomic, assign) BOOL isMineVC; //是否是"我的"页面 | 51 | +@property (nonatomic, assign) BOOL isOwnSucc; |
| 48 | @property (nonatomic, assign) BOOL isHandler;//是否监听识别结果 | 52 | @property (nonatomic, assign) BOOL isHandler;//是否监听识别结果 |
| 53 | +@property (nonatomic, strong) UIImagePickerController *pickerVC; | ||
| 49 | 54 | ||
| 50 | @property (nonatomic, strong) ApplyForConfirmCell *confirmCell; | 55 | @property (nonatomic, strong) ApplyForConfirmCell *confirmCell; |
| 51 | 56 | ||
| @@ -58,35 +63,21 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -58,35 +63,21 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 58 | void (^_failHandler)(NSError *); | 63 | void (^_failHandler)(NSError *); |
| 59 | } | 64 | } |
| 60 | 65 | ||
| 61 | -- (void)viewWillAppear:(BOOL)animated { | ||
| 62 | - [super viewWillAppear:animated]; | ||
| 63 | -} | ||
| 64 | - | ||
| 65 | -- (instancetype)initWithIsMineVC:(BOOL)isMineVC | ||
| 66 | -{ | ||
| 67 | - self = [super init]; | ||
| 68 | - if (self) { | ||
| 69 | - self.isMineVC = isMineVC; | ||
| 70 | - } | ||
| 71 | - return self; | ||
| 72 | -} | ||
| 73 | - | ||
| 74 | - (void)viewDidLoad { | 66 | - (void)viewDidLoad { |
| 75 | [super viewDidLoad]; | 67 | [super viewDidLoad]; |
| 76 | - self.title = @"资质上传"; | 68 | + self.title = @"拍摄照片"; |
| 77 | self.view.backgroundColor = [UIColor whiteColor]; | 69 | self.view.backgroundColor = [UIColor whiteColor]; |
| 78 | self.imageDatas = [NSMutableArray array]; | 70 | self.imageDatas = [NSMutableArray array]; |
| 79 | -#pragma mark -warning 这里注释掉了 | 71 | + self.pickerVC = [[UIImagePickerController alloc] init]; |
| 72 | + self.pickerVC.delegate = self; | ||
| 80 | [[AipOcrService shardService] authWithAK:BDAppKey andSK:BDSecret]; | 73 | [[AipOcrService shardService] authWithAK:BDAppKey andSK:BDSecret]; |
| 81 | [self loadData]; | 74 | [self loadData]; |
| 82 | [self.view addSubview:self.tableView]; | 75 | [self.view addSubview:self.tableView]; |
| 83 | -// if (@available(iOS 11, *)) { | ||
| 84 | -// if (self.isViewLoaded) { | ||
| 85 | -// self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; | ||
| 86 | -// } | ||
| 87 | -// } else { | ||
| 88 | -// self.automaticallyAdjustsScrollViewInsets = NO; | ||
| 89 | -// } | 76 | + if (@available(iOS 11.0, *)) { |
| 77 | + self.tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; | ||
| 78 | + }else{ | ||
| 79 | + self.automaticallyAdjustsScrollViewInsets = NO; | ||
| 80 | + } | ||
| 90 | [self configCallback]; | 81 | [self configCallback]; |
| 91 | 82 | ||
| 92 | } | 83 | } |
| @@ -97,13 +88,21 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -97,13 +88,21 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 97 | @{ | 88 | @{ |
| 98 | @"shootTitle":@"第一步", | 89 | @"shootTitle":@"第一步", |
| 99 | @"shootImage":@"observer_idcard_front", | 90 | @"shootImage":@"observer_idcard_front", |
| 100 | - @"isFront":@"1" | 91 | + @"isFront":@"1", |
| 92 | + @"isOwn":@"0" | ||
| 101 | }, | 93 | }, |
| 102 | @{ | 94 | @{ |
| 103 | @"shootTitle":@"第二步", | 95 | @"shootTitle":@"第二步", |
| 104 | @"shootImage":@"observer_idcard_back", | 96 | @"shootImage":@"observer_idcard_back", |
| 105 | - @"isFront":@"0" | ||
| 106 | - } | 97 | + @"isFront":@"0", |
| 98 | + @"isOwn":@"0" | ||
| 99 | + }, | ||
| 100 | + @{ | ||
| 101 | + @"shootTitle":@"第三步", | ||
| 102 | + @"shootImage":@"observer_idcard_own", | ||
| 103 | + @"isFront":@"0", | ||
| 104 | + @"isOwn":@"1" | ||
| 105 | + }, | ||
| 107 | ]; | 106 | ]; |
| 108 | NSMutableArray *arrayM = [NSMutableArray array]; | 107 | NSMutableArray *arrayM = [NSMutableArray array]; |
| 109 | for (NSDictionary *dic in array) { | 108 | for (NSDictionary *dic in array) { |
| @@ -125,7 +124,6 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -125,7 +124,6 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 125 | return ; | 124 | return ; |
| 126 | } | 125 | } |
| 127 | weakSelf.isHandler = NO; | 126 | weakSelf.isHandler = NO; |
| 128 | - NSLog(@">>>>>>>>>>>>>>>>>>>>>>result: %@", result); | ||
| 129 | NSString *title = @"识别结果"; | 127 | NSString *title = @"识别结果"; |
| 130 | NSMutableString *message = [NSMutableString string]; | 128 | NSMutableString *message = [NSMutableString string]; |
| 131 | 129 | ||
| @@ -227,8 +225,8 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -227,8 +225,8 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 227 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 225 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 228 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 226 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 229 | cell.imgV.image = weakSelf.fontImage; | 227 | cell.imgV.image = weakSelf.fontImage; |
| 230 | - if (weakSelf.isBackSucc) { | ||
| 231 | - weakSelf.confirmCell.confirmButton.backgroundColor = CNLiveColorWithHexString(@"#23D41E"); | 228 | + if (weakSelf.isBackSucc && weakSelf.isOwnSucc) { |
| 229 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 232 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | 230 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; |
| 233 | } | 231 | } |
| 234 | } else { | 232 | } else { |
| @@ -237,8 +235,8 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -237,8 +235,8 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 237 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 235 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 238 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 236 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 239 | cell.imgV.image = weakSelf.backImage; | 237 | cell.imgV.image = weakSelf.backImage; |
| 240 | - if (weakSelf.isFontSucc) { | ||
| 241 | - weakSelf.confirmCell.confirmButton.backgroundColor = CNLiveColorWithHexString(@"#23D41E"); | 238 | + if (weakSelf.isFontSucc && weakSelf.isOwnSucc) { |
| 239 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 242 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | 240 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; |
| 243 | } | 241 | } |
| 244 | } | 242 | } |
| @@ -332,8 +330,8 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -332,8 +330,8 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 332 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; | 330 | NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; |
| 333 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 331 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 334 | cell.imgV.image = weakSelf.fontImage; | 332 | cell.imgV.image = weakSelf.fontImage; |
| 335 | - if (weakSelf.isBackSucc) { | ||
| 336 | - weakSelf.confirmCell.confirmButton.backgroundColor = CNLiveColorWithHexString(@"#23D41E"); | 333 | + if (weakSelf.isBackSucc && weakSelf.isOwnSucc) { |
| 334 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 337 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | 335 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; |
| 338 | } | 336 | } |
| 339 | } else { | 337 | } else { |
| @@ -342,8 +340,8 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -342,8 +340,8 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 342 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; | 340 | NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; |
| 343 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | 341 | ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; |
| 344 | cell.imgV.image = weakSelf.backImage; | 342 | cell.imgV.image = weakSelf.backImage; |
| 345 | - if (weakSelf.isFontSucc) { | ||
| 346 | - weakSelf.confirmCell.confirmButton.backgroundColor = CNLiveColorWithHexString(@"#23D41E"); | 343 | + if (weakSelf.isFontSucc && weakSelf.isOwnSucc) { |
| 344 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 347 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | 345 | [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; |
| 348 | } | 346 | } |
| 349 | } | 347 | } |
| @@ -478,11 +476,6 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -478,11 +476,6 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 478 | } | 476 | } |
| 479 | } | 477 | } |
| 480 | 478 | ||
| 481 | -#pragma mark - 测试版点击图片传假图片 | ||
| 482 | -- (void)takeTestPhoto:(BOOL)isFront { | ||
| 483 | - NSLog(@"测试版点击图片传假图片"); | ||
| 484 | -} | ||
| 485 | - | ||
| 486 | #pragma mark - | 479 | #pragma mark - |
| 487 | #pragma mark - 提交 Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 480 | #pragma mark - 提交 Action !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 488 | - (void)submit:(UIButton *)sender { | 481 | - (void)submit:(UIButton *)sender { |
| @@ -490,16 +483,6 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -490,16 +483,6 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 490 | sender.selected = !sender.selected; | 483 | sender.selected = !sender.selected; |
| 491 | sender.userInteractionEnabled = NO; | 484 | sender.userInteractionEnabled = NO; |
| 492 | 485 | ||
| 493 | - ///////////////////////////////////////////////测试 | ||
| 494 | -// self.realName = @"李五"; | ||
| 495 | -// self.idCardNo = @"370404199205160035"; | ||
| 496 | -// self.isFontSucc = YES; | ||
| 497 | -// self.isBackSucc = YES; | ||
| 498 | -// self.fontImage = [UIImage imageNamed:@"dl_shibai"]; | ||
| 499 | -// self.backImage = [UIImage imageNamed:@"dl_shibai"]; | ||
| 500 | - ///////////////////////////////////////////////测试 | ||
| 501 | - | ||
| 502 | - | ||
| 503 | if (!self.isFontSucc) { | 486 | if (!self.isFontSucc) { |
| 504 | sender.selected = !sender.selected; | 487 | sender.selected = !sender.selected; |
| 505 | sender.userInteractionEnabled = YES; | 488 | sender.userInteractionEnabled = YES; |
| @@ -510,34 +493,25 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -510,34 +493,25 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 510 | sender.userInteractionEnabled = YES; | 493 | sender.userInteractionEnabled = YES; |
| 511 | [QMUITips showWithText:@"请上传证件照片(后)" inView:self.view hideAfterDelay:1.5]; | 494 | [QMUITips showWithText:@"请上传证件照片(后)" inView:self.view hideAfterDelay:1.5]; |
| 512 | return; | 495 | return; |
| 496 | + } else if (!self.isOwnSucc) { | ||
| 497 | + sender.selected = !sender.selected; | ||
| 498 | + sender.userInteractionEnabled = YES; | ||
| 499 | + [QMUITips showWithText:@"请上传本人照片" inView:self.view hideAfterDelay:1.5]; | ||
| 500 | + return; | ||
| 513 | } | 501 | } |
| 514 | 502 | ||
| 515 | - NSMutableDictionary *idCardObvDic = [NSMutableDictionary dictionaryWithCapacity:2]; | ||
| 516 | - [idCardObvDic setObject:[NSString stringWithFormat:@"%.0f",self.fontImage.size.width] forKey:@"imageWidth"]; | ||
| 517 | - [idCardObvDic setObject:[NSString stringWithFormat:@"%.0f",self.fontImage.size.height] forKey:@"imageHeight"]; | ||
| 518 | - NSString *idCardObvInfo = [self convertToJsonData:idCardObvDic]; | ||
| 519 | - | ||
| 520 | - NSMutableDictionary *idCardRevDic = [NSMutableDictionary dictionaryWithCapacity:2]; | ||
| 521 | - [idCardRevDic setObject:[NSString stringWithFormat:@"%.0f",self.backImage.size.width] forKey:@"imageWidth"]; | ||
| 522 | - [idCardRevDic setObject:[NSString stringWithFormat:@"%.0f",self.backImage.size.height] forKey:@"imageHeight"]; | ||
| 523 | - NSString *idCardRevInfo = [self convertToJsonData:idCardRevDic]; | ||
| 524 | - | ||
| 525 | -// NSLog(@"%@---%@",idCardObvInfo,idCardRevInfo); | ||
| 526 | - | ||
| 527 | NSMutableDictionary *params = [@{ | 503 | NSMutableDictionary *params = [@{ |
| 528 | - @"witSid" : CNUserShareModel.uid, | ||
| 529 | - @"realName" : self.realName, | ||
| 530 | - @"idCardNo" : self.idCardNo, | ||
| 531 | - @"mobile" : CNUserShareModel.mobile, | ||
| 532 | - @"idCardObvInfo" : idCardObvInfo ? idCardObvInfo : @"", | ||
| 533 | - @"idCardRevInfo" : idCardRevInfo ? idCardRevInfo : @"" | 504 | + @"sid" : CNUserShareModel.uid?CNUserShareModel.uid:@"", |
| 505 | + @"realName" : self.realName?self.realName:@"", | ||
| 506 | + @"idCardNo" : self.idCardNo?self.idCardNo:@"", | ||
| 507 | + @"address" : self.address?self.address:@"", | ||
| 534 | } mutableCopy]; | 508 | } mutableCopy]; |
| 535 | 509 | ||
| 536 | NSMutableDictionary *para = [CNLiveBusinessTools encryptionSignWithParameter:[NSMutableDictionary dictionaryWithDictionary:params] encryptionKey:APPKey]; | 510 | NSMutableDictionary *para = [CNLiveBusinessTools encryptionSignWithParameter:[NSMutableDictionary dictionaryWithDictionary:params] encryptionKey:APPKey]; |
| 537 | 511 | ||
| 538 | __weak typeof(self) weakSelf = self; | 512 | __weak typeof(self) weakSelf = self; |
| 539 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; | 513 | AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; |
| 540 | - [manager POST:CNApplyWitnessUrl parameters:para headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { | 514 | + [manager POST:@"https://apiwjjtest.cnlive.com/Daren/buser/saveIdentity.action" parameters:para headers:nil constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) { |
| 541 | 515 | ||
| 542 | NSData *fontData = [weakSelf imageDatasWithImage:self.fontImage]; | 516 | NSData *fontData = [weakSelf imageDatasWithImage:self.fontImage]; |
| 543 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; | 517 | NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; |
| @@ -553,6 +527,12 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -553,6 +527,12 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 553 | [formData appendPartWithFileData:backData name:[NSString stringWithFormat:@"idCardRev"] fileName:fileName2 mimeType:@"image/png"]; // mimeType: image/jpg,image/png | 527 | [formData appendPartWithFileData:backData name:[NSString stringWithFormat:@"idCardRev"] fileName:fileName2 mimeType:@"image/png"]; // mimeType: image/jpg,image/png |
| 554 | } | 528 | } |
| 555 | 529 | ||
| 530 | + NSData *iconData = [weakSelf imageDatasWithImage:self.iconImage]; | ||
| 531 | + NSString *fileName3 = [NSString stringWithFormat:@"%@%@.png",[formatter stringFromDate:[NSDate date]],@(3)]; | ||
| 532 | + if (iconData) { | ||
| 533 | + [formData appendPartWithFileData:iconData name:[NSString stringWithFormat:@"icon"] fileName:fileName3 mimeType:@"image/png"]; | ||
| 534 | + } | ||
| 535 | + | ||
| 556 | } progress:^(NSProgress * _Nonnull uploadProgress) { | 536 | } progress:^(NSProgress * _Nonnull uploadProgress) { |
| 557 | 537 | ||
| 558 | } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { | 538 | } success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { |
| @@ -561,44 +541,9 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -561,44 +541,9 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 561 | 541 | ||
| 562 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { | 542 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { |
| 563 | 543 | ||
| 564 | - NSDictionary *data = [NSDictionary dictionaryWithDictionary:responseObject[@"data"]]; | ||
| 565 | - NSString *reviewStatus = [NSString stringWithFormat:@"%@",data[@"reviewStatus"]];//0-申请成功审核中,1-审核失败(可再次申请),2审核成功(已成为目击者) | ||
| 566 | - if ([reviewStatus isEqualToString:@"0"]) { | ||
| 567 | - dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 568 | -// CNApplyStatusController *statusVC = [[CNApplyStatusController alloc] initWithType:AuditStatusTypeAppling]; | ||
| 569 | -// statusVC.applyStatusVCDelegate = weakSelf; | ||
| 570 | -// [[AppDelegate sharedAppDelegate] pushViewController:statusVC withBackTitle:@" "]; | ||
| 571 | - if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(completeRefresh)]) { | ||
| 572 | - [weakSelf.delegate completeRefresh]; | ||
| 573 | - } | ||
| 574 | - [weakSelf backAction]; | ||
| 575 | - }); | ||
| 576 | - } else if ([reviewStatus isEqualToString:@"1"]) { | ||
| 577 | - dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 578 | -// CNApplyStatusController *statusVC = [[CNApplyStatusController alloc] initWithType:AuditStatusTypeApplyFailed]; | ||
| 579 | -// statusVC.applyStatusVCDelegate = weakSelf; | ||
| 580 | -// [[AppDelegate sharedAppDelegate] pushViewController:statusVC withBackTitle:@" "]; | ||
| 581 | - if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(completeRefresh)]) { | ||
| 582 | - [weakSelf.delegate completeRefresh]; | ||
| 583 | - } | ||
| 584 | - [weakSelf backAction]; | ||
| 585 | - }); | ||
| 586 | - } else if ([reviewStatus isEqualToString:@"2"]) { | ||
| 587 | - dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 588 | -// CNApplyStatusController *statusVC = [[CNApplyStatusController alloc] initWithType:AuditStatusTypeAppling]; | ||
| 589 | -// statusVC.applyStatusVCDelegate = weakSelf; | ||
| 590 | -// [[AppDelegate sharedAppDelegate] pushViewController:statusVC withBackTitle:@" "]; | ||
| 591 | - if (weakSelf.delegate && [weakSelf.delegate respondsToSelector:@selector(completeRefresh)]) { | ||
| 592 | - [weakSelf.delegate completeRefresh]; | ||
| 593 | - } | ||
| 594 | - [weakSelf backAction]; | ||
| 595 | - }); | ||
| 596 | - } else { | ||
| 597 | - | ||
| 598 | - sender.selected = !sender.selected; | ||
| 599 | - sender.userInteractionEnabled = YES; | ||
| 600 | - [QMUITips showError:responseObject[@"errorMessage"] inView:self.view hideAfterDelay:1.5]; | ||
| 601 | - } | 544 | + //成功 |
| 545 | + CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | ||
| 546 | + [self.navigationController pushViewController:vc animated:NO]; | ||
| 602 | 547 | ||
| 603 | } else {//接口失败 | 548 | } else {//接口失败 |
| 604 | 549 | ||
| @@ -616,13 +561,6 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -616,13 +561,6 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 616 | }]; | 561 | }]; |
| 617 | } | 562 | } |
| 618 | 563 | ||
| 619 | -#pragma mark - CNApplyStatusVCDelegate !!!!!!!!!!!! | ||
| 620 | -- (void)statusVCBackRefreshH5WitnessStatus { | ||
| 621 | - if (self.delegate && [self.delegate respondsToSelector:@selector(completeRefresh)]) { | ||
| 622 | - [self.delegate completeRefresh]; | ||
| 623 | - } | ||
| 624 | -} | ||
| 625 | - | ||
| 626 | #pragma mark - Action !!!!!!!!!!!!!!!!!!! | 564 | #pragma mark - Action !!!!!!!!!!!!!!!!!!! |
| 627 | - (void)backAction | 565 | - (void)backAction |
| 628 | { | 566 | { |
| @@ -657,27 +595,41 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -657,27 +595,41 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 657 | } | 595 | } |
| 658 | 596 | ||
| 659 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { | 597 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { |
| 660 | - return 3; | 598 | + return self.dataArray.count+1; |
| 661 | } | 599 | } |
| 662 | 600 | ||
| 663 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { | 601 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 664 | 602 | ||
| 665 | - if (indexPath.row == 0 || indexPath.row == 1) { | 603 | + if (indexPath.row < self.dataArray.count) { |
| 666 | AgreementModel *model = self.dataArray[indexPath.row]; | 604 | AgreementModel *model = self.dataArray[indexPath.row]; |
| 667 | - ApplyForShootCell *cell = [tableView dequeueReusableCellWithIdentifier:shootCellId forIndexPath:indexPath]; | ||
| 668 | - cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 669 | - cell.model = model; | 605 | + NSString *shootCellId = [NSString stringWithFormat:@"%zd",indexPath.row]; |
| 606 | + ApplyForShootCell *cell = [tableView dequeueReusableCellWithIdentifier:shootCellId]; | ||
| 607 | + if (!cell) { | ||
| 608 | + cell = [[ApplyForShootCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:shootCellId]; | ||
| 609 | + cell.model = model; | ||
| 610 | + cell.selectionStyle = UITableViewCellSelectionStyleNone; | ||
| 611 | + } | ||
| 670 | __weak __typeof(self)weakSelf = self; | 612 | __weak __typeof(self)weakSelf = self; |
| 671 | cell.clickShootBtnBlock = ^() { | 613 | cell.clickShootBtnBlock = ^() { |
| 672 | - [weakSelf takePhoto:model.isFront]; | 614 | + if (model.isOwn) { |
| 615 | + //拍照||相册 | ||
| 616 | + [weakSelf iconAction]; | ||
| 617 | + } else { | ||
| 618 | + //身份证 | ||
| 619 | + [weakSelf takePhoto:model.isFront]; | ||
| 620 | + } | ||
| 673 | }; | 621 | }; |
| 674 | return cell; | 622 | return cell; |
| 675 | 623 | ||
| 676 | } else { | 624 | } else { |
| 677 | - ApplyForConfirmCell *cell = [tableView dequeueReusableCellWithIdentifier:confirmCellId forIndexPath:indexPath]; | 625 | + NSString *confirmCellId = [NSString stringWithFormat:@"%zd",indexPath.row]; |
| 626 | + ApplyForConfirmCell *cell = [tableView dequeueReusableCellWithIdentifier:confirmCellId]; | ||
| 627 | + if (!cell) { | ||
| 628 | + cell = [[ApplyForConfirmCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:confirmCellId]; | ||
| 629 | + } | ||
| 678 | cell.selectionStyle = UITableViewCellSelectionStyleNone; | 630 | cell.selectionStyle = UITableViewCellSelectionStyleNone; |
| 679 | AgreementModel *model = [[AgreementModel alloc] init]; | 631 | AgreementModel *model = [[AgreementModel alloc] init]; |
| 680 | - model.confirmTitle = @"提交"; | 632 | + model.confirmTitle = @"下一步"; |
| 681 | cell.model = model; | 633 | cell.model = model; |
| 682 | __weak __typeof(self)weakSelf = self; | 634 | __weak __typeof(self)weakSelf = self; |
| 683 | cell.clickBtnBlock = ^(UIButton *btn){ | 635 | cell.clickBtnBlock = ^(UIButton *btn){ |
| @@ -690,8 +642,12 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -690,8 +642,12 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 690 | } | 642 | } |
| 691 | 643 | ||
| 692 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { | 644 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { |
| 693 | - if (indexPath.row==0 || indexPath.row==1) { | ||
| 694 | - return 256; | 645 | + if (indexPath.row < self.dataArray.count) { |
| 646 | + if (indexPath.row == 2) { | ||
| 647 | + return 299; | ||
| 648 | + } else { | ||
| 649 | + return 256; | ||
| 650 | + } | ||
| 695 | } else { | 651 | } else { |
| 696 | if (kNavigationBarHeight+256*2+145<KScreenHeight) { | 652 | if (kNavigationBarHeight+256*2+145<KScreenHeight) { |
| 697 | return KScreenHeight-kNavigationBarHeight-256*2; | 653 | return KScreenHeight-kNavigationBarHeight-256*2; |
| @@ -701,6 +657,172 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -701,6 +657,172 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 701 | } | 657 | } |
| 702 | } | 658 | } |
| 703 | 659 | ||
| 660 | +#pragma mark - 自拍 | ||
| 661 | +-(void)photoBtnClick { | ||
| 662 | + | ||
| 663 | + __weak __typeof(self)weakSelf = self; | ||
| 664 | + [self.view createAlertViewTitleArray:@[@"拍照",@"从手机相册选择"] subTitleArr:@[@"",@""] textColor:RGBA(76, 170, 252, 1) subTitleColor:[UIColor whiteColor] firstFont:UIFontMake(18.0f) font:UIFontMake(18.0f) subFont:UIFontMake(18.0f) cancelTitle:@"取消" cancelFont:UIFontMake(18.0f) cancelTitleColor:UIColorMake(102, 102, 102) actionBlock:^(UIButton *button, NSInteger didRow) { | ||
| 665 | + switch (didRow) { | ||
| 666 | + case 0:{ | ||
| 667 | + [weakSelf takeToXFPhoto]; | ||
| 668 | + } | ||
| 669 | + break; | ||
| 670 | + case 1:{ | ||
| 671 | + [weakSelf pushTZImagePickerController]; | ||
| 672 | + } | ||
| 673 | + break; | ||
| 674 | + default: | ||
| 675 | + break; | ||
| 676 | + } | ||
| 677 | + }]; | ||
| 678 | +} | ||
| 679 | + | ||
| 680 | +#pragma mark - 跳转到相机 | ||
| 681 | +-(void)takeToXFPhoto { | ||
| 682 | + if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypeCamera]) { | ||
| 683 | + self.pickerVC.sourceType = UIImagePickerControllerSourceTypeCamera; | ||
| 684 | + //设置拍照后的图片可被编辑 | ||
| 685 | + self.pickerVC.modalPresentationStyle = UIModalPresentationFullScreen; | ||
| 686 | + self.pickerVC.cameraDevice = UIImagePickerControllerCameraDeviceFront; | ||
| 687 | + self.pickerVC.allowsEditing = YES; | ||
| 688 | + [self presentViewController:self.pickerVC animated:YES completion:nil]; | ||
| 689 | + } | ||
| 690 | +} | ||
| 691 | + | ||
| 692 | +#pragma mark - UIImagePickerControllerDelegate | ||
| 693 | +- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info { | ||
| 694 | + | ||
| 695 | + NSString *type = [info objectForKey:UIImagePickerControllerMediaType]; | ||
| 696 | + //当选择的类型是图片 | ||
| 697 | + if ([type isEqualToString:@"public.image"]) | ||
| 698 | + { | ||
| 699 | + NSString *key = nil; | ||
| 700 | + if (picker.allowsEditing) { | ||
| 701 | + key = UIImagePickerControllerEditedImage; | ||
| 702 | + } | ||
| 703 | + else { | ||
| 704 | + key = UIImagePickerControllerOriginalImage; | ||
| 705 | + } | ||
| 706 | + //获取图片 | ||
| 707 | + UIImage *image = [info objectForKey:key]; | ||
| 708 | + //设置头像 | ||
| 709 | + [self handleIconWithImage:image]; | ||
| 710 | + //关闭相册界面 | ||
| 711 | + [picker dismissViewControllerAnimated:YES completion:^{ | ||
| 712 | + | ||
| 713 | + }]; | ||
| 714 | + } | ||
| 715 | +} | ||
| 716 | + | ||
| 717 | +- (void)handleIconWithImage:(UIImage *)image { | ||
| 718 | + // 固定方向 | ||
| 719 | + image = [image fixOrientation];//这个方法是UIImage+Extras.h中方法 | ||
| 720 | + //压缩图片质量 | ||
| 721 | + image = [self reduceImage:image percent:0.5]; | ||
| 722 | + | ||
| 723 | +// CGSize imageSize = image.size; | ||
| 724 | +// imageSize.height = 320; | ||
| 725 | +// imageSize.width = 320; | ||
| 726 | +// image = [self imageWithImageSimple:image scaledToSize:imageSize]; | ||
| 727 | + __weak typeof(self)weakSelf = self; | ||
| 728 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 729 | + NSIndexPath *index = [NSIndexPath indexPathForRow:2 inSection:0]; | ||
| 730 | + ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | ||
| 731 | + cell.imgV.image = image; | ||
| 732 | + weakSelf.isOwnSucc = YES; | ||
| 733 | + weakSelf.iconImage = image; | ||
| 734 | + if (weakSelf.isFont && weakSelf.isBackSucc) { | ||
| 735 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 736 | + [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | ||
| 737 | + } | ||
| 738 | + }); | ||
| 739 | + | ||
| 740 | +} | ||
| 741 | + | ||
| 742 | +//压缩图片质量 | ||
| 743 | +-(UIImage *)reduceImage:(UIImage *)image percent:(float)percent { | ||
| 744 | + NSData *imageData = UIImageJPEGRepresentation(image, percent); | ||
| 745 | + UIImage *newImage = [UIImage imageWithData:imageData]; | ||
| 746 | + return newImage; | ||
| 747 | +} | ||
| 748 | +//压缩图片尺寸 | ||
| 749 | +- (UIImage*)imageWithImageSimple:(UIImage*)image scaledToSize:(CGSize)newSize { | ||
| 750 | + UIGraphicsBeginImageContext(newSize); | ||
| 751 | + [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)]; | ||
| 752 | + UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext(); | ||
| 753 | + UIGraphicsEndImageContext(); | ||
| 754 | + return newImage; | ||
| 755 | +} | ||
| 756 | + | ||
| 757 | +//当用户取消选择的时候,调用该方法 | ||
| 758 | +- (void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { | ||
| 759 | + [picker dismissViewControllerAnimated:YES completion:^{}]; | ||
| 760 | +} | ||
| 761 | + | ||
| 762 | +// 自拍cell点击事件 | ||
| 763 | +- (void)iconAction { | ||
| 764 | + AVAuthorizationStatus authStatus = [AVCaptureDevice authorizationStatusForMediaType:AVMediaTypeVideo]; | ||
| 765 | + if ((authStatus == AVAuthorizationStatusRestricted || authStatus ==AVAuthorizationStatusDenied) && iOS7Later) { | ||
| 766 | + // 无权限 做一个友好的提示 | ||
| 767 | + [self goPrivacySetting]; | ||
| 768 | + } else if (authStatus == AVAuthorizationStatusNotDetermined) { | ||
| 769 | + // fix issue 466, 防止用户首次拍照拒绝授权时相机页黑屏 | ||
| 770 | + if (iOS7Later) { | ||
| 771 | + [AVCaptureDevice requestAccessForMediaType:AVMediaTypeVideo completionHandler:^(BOOL granted) { | ||
| 772 | + if (granted) { | ||
| 773 | + dispatch_sync(dispatch_get_main_queue(), ^{ | ||
| 774 | + [self photoBtnClick]; | ||
| 775 | + }); | ||
| 776 | + } | ||
| 777 | + }]; | ||
| 778 | + } else { | ||
| 779 | + [self photoBtnClick]; | ||
| 780 | + } | ||
| 781 | + } else { | ||
| 782 | + [self photoBtnClick]; | ||
| 783 | + } | ||
| 784 | +} | ||
| 785 | +// 隐私设置提醒 | ||
| 786 | +- (void)goPrivacySetting { | ||
| 787 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 788 | + NSString *appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleDisplayName"]; | ||
| 789 | + if (!appName) appName = [[NSBundle mainBundle].infoDictionary valueForKey:@"CFBundleName"]; | ||
| 790 | + NSString *message = [NSString stringWithFormat:@"请去-> [设置 - 隐私 - 相机 - %@] 打开访问开关",appName]; | ||
| 791 | + QMUIAlertAction *action1 = [QMUIAlertAction actionWithTitle:@"确定" style:QMUIAlertActionStyleCancel handler:^(__kindof QMUIAlertController *aAlertController, QMUIAlertAction *action) { | ||
| 792 | + | ||
| 793 | + }]; | ||
| 794 | + QMUIAlertController *alertController = [QMUIAlertController alertControllerWithTitle:@"警告" message:message preferredStyle:QMUIAlertControllerStyleAlert]; | ||
| 795 | + [alertController addAction:action1]; | ||
| 796 | + [alertController showWithAnimated:YES]; | ||
| 797 | + | ||
| 798 | + }); | ||
| 799 | +} | ||
| 800 | + | ||
| 801 | +#pragma maek -从相册选择 | ||
| 802 | +- (void)pushTZImagePickerController { | ||
| 803 | + __weak typeof(self)weakSelf = self; | ||
| 804 | + TZImagePickerController *picker = [[TZImagePickerController alloc]initWithMaxImagesCount:1 delegate:self]; | ||
| 805 | + picker.modalPresentationStyle = UIModalPresentationFullScreen; | ||
| 806 | + picker.allowPickingVideo = NO; | ||
| 807 | + picker.allowPreview = NO; | ||
| 808 | + picker.allowPickingGif = NO; | ||
| 809 | + picker.allowTakePicture = NO; | ||
| 810 | + [picker setDidFinishPickingPhotosHandle:^(NSArray<UIImage *> *photos, NSArray *assets, BOOL isSelectOriginalPhoto) { | ||
| 811 | + dispatch_async(dispatch_get_main_queue(), ^{ | ||
| 812 | + NSIndexPath *index = [NSIndexPath indexPathForRow:2 inSection:0]; | ||
| 813 | + ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; | ||
| 814 | + cell.imgV.image = [photos firstObject]; | ||
| 815 | + weakSelf.isOwnSucc = YES; | ||
| 816 | + weakSelf.iconImage = [photos firstObject]; | ||
| 817 | + if (weakSelf.isFont && weakSelf.isBackSucc) { | ||
| 818 | + weakSelf.confirmCell.confirmButton.backgroundColor = RGBA(76, 170, 252, 1); | ||
| 819 | + [weakSelf.confirmCell.confirmButton setTitleColor:kWhiteColor forState:UIControlStateNormal]; | ||
| 820 | + } | ||
| 821 | + }); | ||
| 822 | + }]; | ||
| 823 | + [self presentViewController:picker animated:YES completion:nil]; | ||
| 824 | +} | ||
| 825 | + | ||
| 704 | #pragma mark UIAlertViewDelegate | 826 | #pragma mark UIAlertViewDelegate |
| 705 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { | 827 | - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { |
| 706 | [self dismissViewControllerAnimated:YES completion:nil]; | 828 | [self dismissViewControllerAnimated:YES completion:nil]; |
| @@ -732,10 +854,8 @@ static NSString *confirmCellId = @"confirmCellId"; | @@ -732,10 +854,8 @@ static NSString *confirmCellId = @"confirmCellId"; | ||
| 732 | #pragma mark - SubViews | 854 | #pragma mark - SubViews |
| 733 | -(UITableView *)tableView { | 855 | -(UITableView *)tableView { |
| 734 | if (!_tableView) { | 856 | if (!_tableView) { |
| 735 | - _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight-(self.isMineVC?kNavigationBarHeight:0)) style:UITableViewStylePlain]; | 857 | + _tableView = [[UITableView alloc] initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight-kNavigationBarHeight) style:UITableViewStylePlain]; |
| 736 | _tableView.backgroundColor = RGB(242, 242, 242); | 858 | _tableView.backgroundColor = RGB(242, 242, 242); |
| 737 | - [_tableView registerClass:[ApplyForShootCell class] forCellReuseIdentifier:shootCellId]; | ||
| 738 | - [_tableView registerClass:[ApplyForConfirmCell class] forCellReuseIdentifier:confirmCellId]; | ||
| 739 | _tableView.delegate = self; | 859 | _tableView.delegate = self; |
| 740 | _tableView.dataSource = self; | 860 | _tableView.dataSource = self; |
| 741 | _tableView.separatorStyle = NO; | 861 | _tableView.separatorStyle = NO; |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/AgreementModel.h
| @@ -15,5 +15,6 @@ | @@ -15,5 +15,6 @@ | ||
| 15 | @property (nonatomic, copy) NSString *shootTitle; | 15 | @property (nonatomic, copy) NSString *shootTitle; |
| 16 | @property (nonatomic, copy) NSString *shootImage; | 16 | @property (nonatomic, copy) NSString *shootImage; |
| 17 | @property (nonatomic, assign) BOOL isFront; | 17 | @property (nonatomic, assign) BOOL isFront; |
| 18 | +@property (nonatomic, assign) BOOL isOwn; | ||
| 18 | 19 | ||
| 19 | @end | 20 | @end |
CNLiveIDCardAuthGetImage.h renamed to CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/CNLiveIDCardAuthGetImage.h
CNLiveIDCardAuthGetImage.m renamed to CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/CNLiveIDCardAuthGetImage.m
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Services/CNBPersonalAuthenticationService.h renamed to CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Services/CNIDCardAuthenticationServices.h
| 1 | // | 1 | // |
| 2 | -// CNBPersonalAuthenticationService.h | 2 | +// CNIDCardAuthenticationServices.h |
| 3 | // CNLiveBPersonalVerificationModule | 3 | // CNLiveBPersonalVerificationModule |
| 4 | // | 4 | // |
| 5 | -// Created by 殷巧娟 on 2020/4/17. | 5 | +// Created by cnliveJunBo on 2020/4/22. |
| 6 | // | 6 | // |
| 7 | 7 | ||
| 8 | #import <Foundation/Foundation.h> | 8 | #import <Foundation/Foundation.h> |
| 9 | 9 | ||
| 10 | NS_ASSUME_NONNULL_BEGIN | 10 | NS_ASSUME_NONNULL_BEGIN |
| 11 | 11 | ||
| 12 | -@interface CNBPersonalAuthenticationService : NSObject | 12 | +@interface CNIDCardAuthenticationServices : NSObject |
| 13 | 13 | ||
| 14 | @end | 14 | @end |
| 15 | 15 |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Services/CNBPersonalAuthenticationService.m renamed to CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Services/CNIDCardAuthenticationServices.m
| 1 | // | 1 | // |
| 2 | -// CNBPersonalAuthenticationService.m | 2 | +// CNIDCardAuthenticationServices.m |
| 3 | // CNLiveBPersonalVerificationModule | 3 | // CNLiveBPersonalVerificationModule |
| 4 | // | 4 | // |
| 5 | -// Created by 殷巧娟 on 2020/4/17. | 5 | +// Created by cnliveJunBo on 2020/4/22. |
| 6 | // | 6 | // |
| 7 | 7 | ||
| 8 | -#import "CNBPersonalAuthenticationService.h" | 8 | +#import "CNIDCardAuthenticationServices.h" |
| 9 | 9 | ||
| 10 | -@implementation CNBPersonalAuthenticationService | 10 | +@implementation CNIDCardAuthenticationServices |
| 11 | 11 | ||
| 12 | @end | 12 | @end |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/ApplyForConfirmCell.m
| @@ -42,7 +42,7 @@ | @@ -42,7 +42,7 @@ | ||
| 42 | 42 | ||
| 43 | - (UIButton *)confirmButton { | 43 | - (UIButton *)confirmButton { |
| 44 | if (!_confirmButton) { | 44 | if (!_confirmButton) { |
| 45 | - _confirmButton = [UIButton create_textButton:CGRectMake(30, 40, KScreenWidth-60, 45) backgroundColor:RGB(216, 216, 216) title:@"下一步" selectedTitle:@"提交中..." fontSize:18 normalColor:RGB(180, 180, 180) selectedColor:kWhiteColor cornerRadius:4.0 borderWidth:0 borderColor:nil]; | 45 | + _confirmButton = [UIButton create_textButton:CGRectMake(30, 40, KScreenWidth-60, 45) backgroundColor:RGB(216, 216, 216) title:@"下一步" selectedTitle:@"提交中..." fontSize:18 normalColor:RGB(180, 180, 180) selectedColor:kWhiteColor cornerRadius:22.5 borderWidth:0 borderColor:nil]; |
| 46 | [_confirmButton addTarget:self action:@selector(agree:) forControlEvents:UIControlEventTouchUpInside]; | 46 | [_confirmButton addTarget:self action:@selector(agree:) forControlEvents:UIControlEventTouchUpInside]; |
| 47 | } | 47 | } |
| 48 | return _confirmButton; | 48 | return _confirmButton; |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/ApplyForShootCell.m
| @@ -36,6 +36,8 @@ | @@ -36,6 +36,8 @@ | ||
| 36 | 36 | ||
| 37 | _titleLab.text = model.shootTitle; | 37 | _titleLab.text = model.shootTitle; |
| 38 | _imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:model.shootImage bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; | 38 | _imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:model.shootImage bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]]; |
| 39 | + CGFloat width = KScreenWidth - 88; | ||
| 40 | + CGFloat height = width*157.0/287.0; | ||
| 39 | if (model.isFront) { | 41 | if (model.isFront) { |
| 40 | self.lineV.hidden = NO; | 42 | self.lineV.hidden = NO; |
| 41 | NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证正面 注意避免证件反光"]; | 43 | NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证正面 注意避免证件反光"]; |
| @@ -46,6 +48,23 @@ | @@ -46,6 +48,23 @@ | ||
| 46 | NSRange range3 = [[str string] rangeOfString:@" 注意避免证件反光"]; | 48 | NSRange range3 = [[str string] rangeOfString:@" 注意避免证件反光"]; |
| 47 | [str addAttribute:NSForegroundColorAttributeName value:RGBA(156, 156, 156, 1) range:range3]; | 49 | [str addAttribute:NSForegroundColorAttributeName value:RGBA(156, 156, 156, 1) range:range3]; |
| 48 | _subTitleLab.attributedText = str; | 50 | _subTitleLab.attributedText = str; |
| 51 | + [self.imgV mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 52 | + make.top.equalTo(self.subTitleLab.mas_bottom).offset(10); | ||
| 53 | + make.left.equalTo(self).offset(44); | ||
| 54 | + make.right.equalTo(self).offset(-44); | ||
| 55 | + make.height.mas_equalTo(height); | ||
| 56 | + }]; | ||
| 57 | + } else if (model.isOwn) { | ||
| 58 | + self.lineV.hidden = YES; | ||
| 59 | + NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请上传您本人照片,确保肩部至头部清晰可见"]; | ||
| 60 | + [str addAttribute:NSForegroundColorAttributeName value:RGBA(156, 156, 156, 1) range:NSMakeRange(0, str.length)]; | ||
| 61 | + _subTitleLab.attributedText = str; | ||
| 62 | + [self.imgV mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 63 | + make.top.equalTo(self.subTitleLab.mas_bottom).offset(10); | ||
| 64 | + make.left.equalTo(self).offset(44); | ||
| 65 | + make.width.mas_equalTo(133); | ||
| 66 | + make.height.mas_equalTo(199); | ||
| 67 | + }]; | ||
| 49 | } else { | 68 | } else { |
| 50 | self.lineV.hidden = YES; | 69 | self.lineV.hidden = YES; |
| 51 | NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证反面 注意避免证件反光"]; | 70 | NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证反面 注意避免证件反光"]; |
| @@ -56,6 +75,12 @@ | @@ -56,6 +75,12 @@ | ||
| 56 | NSRange range3 = [[str string] rangeOfString:@" 注意避免证件反光"]; | 75 | NSRange range3 = [[str string] rangeOfString:@" 注意避免证件反光"]; |
| 57 | [str addAttribute:NSForegroundColorAttributeName value:RGBA(156, 156, 156, 1) range:range3]; | 76 | [str addAttribute:NSForegroundColorAttributeName value:RGBA(156, 156, 156, 1) range:range3]; |
| 58 | _subTitleLab.attributedText = str; | 77 | _subTitleLab.attributedText = str; |
| 78 | + [self.imgV mas_remakeConstraints:^(MASConstraintMaker *make) { | ||
| 79 | + make.top.equalTo(self.subTitleLab.mas_bottom).offset(10); | ||
| 80 | + make.left.equalTo(self).offset(44); | ||
| 81 | + make.right.equalTo(self).offset(-44); | ||
| 82 | + make.height.mas_equalTo(height); | ||
| 83 | + }]; | ||
| 59 | } | 84 | } |
| 60 | 85 | ||
| 61 | } | 86 | } |
| @@ -68,39 +93,38 @@ | @@ -68,39 +93,38 @@ | ||
| 68 | [self.contentView addSubview:self.imgV]; | 93 | [self.contentView addSubview:self.imgV]; |
| 69 | // [self.imgV addSubview:self.shootBtn]; | 94 | // [self.imgV addSubview:self.shootBtn]; |
| 70 | 95 | ||
| 96 | + [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 97 | + make.left.top.right.equalTo(self.contentView); | ||
| 98 | + make.height.mas_equalTo(1); | ||
| 99 | + }]; | ||
| 100 | + [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 101 | + make.left.equalTo(self.contentView).offset(69); | ||
| 102 | + make.top.equalTo(_lineV.mas_bottom).offset(22); | ||
| 103 | + make.width.mas_equalTo(64); | ||
| 104 | + make.height.mas_equalTo(16); | ||
| 105 | + }]; | ||
| 106 | + [self.subTitleLab mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 107 | + make.left.equalTo(self.contentView).offset(69); | ||
| 108 | + make.top.equalTo(self.titleLab.mas_bottom).offset(15); | ||
| 109 | + make.height.mas_equalTo(15); | ||
| 110 | + }]; | ||
| 111 | + CGFloat width = KScreenWidth - 88; | ||
| 112 | + CGFloat height = width*157.0/287.0; | ||
| 113 | + [self.imgV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 114 | + make.top.equalTo(self.subTitleLab.mas_bottom).offset(10); | ||
| 115 | + make.left.equalTo(self).offset(44); | ||
| 116 | + make.right.equalTo(self).offset(-44); | ||
| 117 | + make.height.mas_equalTo(height); | ||
| 118 | + }]; | ||
| 119 | + // [self.shootBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 120 | + // make.center.equalTo(self.imgV); | ||
| 121 | + // make.width.height.mas_equalTo(60); | ||
| 122 | + // }]; | ||
| 71 | } | 123 | } |
| 72 | 124 | ||
| 73 | - (void)layoutSubviews { | 125 | - (void)layoutSubviews { |
| 74 | [super layoutSubviews]; | 126 | [super layoutSubviews]; |
| 75 | 127 | ||
| 76 | - [self.lineV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 77 | - make.left.top.right.equalTo(self.contentView); | ||
| 78 | - make.height.mas_equalTo(1); | ||
| 79 | - }]; | ||
| 80 | - [self.titleLab mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 81 | - make.left.equalTo(self.contentView).offset(69); | ||
| 82 | - make.top.equalTo(_lineV.mas_bottom).offset(22); | ||
| 83 | - make.width.mas_equalTo(64); | ||
| 84 | - make.height.mas_equalTo(16); | ||
| 85 | - }]; | ||
| 86 | - [self.subTitleLab mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 87 | - make.centerX.equalTo(self.contentView); | ||
| 88 | - make.top.equalTo(self.titleLab.mas_bottom).offset(15); | ||
| 89 | - make.width.mas_equalTo(245); | ||
| 90 | - make.height.mas_equalTo(15); | ||
| 91 | - }]; | ||
| 92 | - CGFloat width = KScreenWidth - 88; | ||
| 93 | - CGFloat height = width*157.0/287.0; | ||
| 94 | - [self.imgV mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 95 | - make.top.equalTo(self.subTitleLab.mas_bottom).offset(10); | ||
| 96 | - make.left.equalTo(self).offset(44); | ||
| 97 | - make.right.equalTo(self).offset(-44); | ||
| 98 | - make.height.mas_equalTo(height); | ||
| 99 | - }]; | ||
| 100 | -// [self.shootBtn mas_makeConstraints:^(MASConstraintMaker *make) { | ||
| 101 | -// make.center.equalTo(self.imgV); | ||
| 102 | -// make.width.height.mas_equalTo(60); | ||
| 103 | -// }]; | ||
| 104 | } | 128 | } |
| 105 | 129 | ||
| 106 | - (void)shootPhotoAction:(UIButton *)sender{ | 130 | - (void)shootPhotoAction:(UIButton *)sender{ |
Example/CNLiveBPersonalVerificationModule.xcodeproj/project.pbxproj
| @@ -371,13 +371,18 @@ | @@ -371,13 +371,18 @@ | ||
| 371 | "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework", | 371 | "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework", |
| 372 | "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework", | 372 | "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework", |
| 373 | "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", | 373 | "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework", |
| 374 | + "${BUILT_PRODUCTS_DIR}/CNLiveImagePickerController/CNLiveImagePickerController.framework", | ||
| 374 | "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", | 375 | "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", |
| 375 | "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", | 376 | "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", |
| 377 | + "${BUILT_PRODUCTS_DIR}/CNLiveUploadManager/CNLiveUploadManager.framework", | ||
| 376 | "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", | 378 | "${BUILT_PRODUCTS_DIR}/CNLiveUserManagement/CNLiveUserManagement.framework", |
| 379 | + "${BUILT_PRODUCTS_DIR}/HappyDNS/HappyDNS.framework", | ||
| 377 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", | 380 | "${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework", |
| 378 | "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", | 381 | "${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework", |
| 379 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", | 382 | "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework", |
| 380 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", | 383 | "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework", |
| 384 | + "${BUILT_PRODUCTS_DIR}/Qiniu/Qiniu.framework", | ||
| 385 | + "${BUILT_PRODUCTS_DIR}/SDAutoLayout/SDAutoLayout.framework", | ||
| 381 | "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", | 386 | "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework", |
| 382 | "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework", | 387 | "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework", |
| 383 | "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework", | 388 | "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework", |
| @@ -399,13 +404,18 @@ | @@ -399,13 +404,18 @@ | ||
| 399 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework", | 404 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework", |
| 400 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework", | 405 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework", |
| 401 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", | 406 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework", |
| 407 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveImagePickerController.framework", | ||
| 402 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", | 408 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", |
| 403 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", | 409 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", |
| 410 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUploadManager.framework", | ||
| 404 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", | 411 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveUserManagement.framework", |
| 412 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/HappyDNS.framework", | ||
| 405 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", | 413 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework", |
| 406 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", | 414 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework", |
| 407 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", | 415 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework", |
| 408 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", | 416 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework", |
| 417 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Qiniu.framework", | ||
| 418 | + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDAutoLayout.framework", | ||
| 409 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", | 419 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework", |
| 410 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework", | 420 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework", |
| 411 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework", | 421 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework", |
Example/CNLiveBPersonalVerificationModule/CNLIVEViewController.m
| @@ -11,6 +11,7 @@ | @@ -11,6 +11,7 @@ | ||
| 11 | #import "CNBPerAuthSuccessController.h" | 11 | #import "CNBPerAuthSuccessController.h" |
| 12 | #import "CNBPerCertificationController.h" | 12 | #import "CNBPerCertificationController.h" |
| 13 | #import "CNLiveBPersonAuthentProtocol.h" | 13 | #import "CNLiveBPersonAuthentProtocol.h" |
| 14 | +#import "ApplyForShootController.h" | ||
| 14 | @interface CNLIVEViewController () | 15 | @interface CNLIVEViewController () |
| 15 | 16 | ||
| 16 | @end | 17 | @end |
| @@ -41,7 +42,9 @@ | @@ -41,7 +42,9 @@ | ||
| 41 | } | 42 | } |
| 42 | 43 | ||
| 43 | - (void)buttonAction { | 44 | - (void)buttonAction { |
| 44 | - CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | 45 | + ApplyForShootController *vc = [[ApplyForShootController alloc] init]; |
| 46 | + | ||
| 47 | +// CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | ||
| 45 | [self.navigationController pushViewController:vc animated:NO]; | 48 | [self.navigationController pushViewController:vc animated:NO]; |
| 46 | // id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)]; | 49 | // id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)]; |
| 47 | // CNBPersonalVerificationController *vc = (CNBPersonalVerificationController *)[service pushToAddPerAuthInstitutionsController:@{}]; | 50 | // CNBPersonalVerificationController *vc = (CNBPersonalVerificationController *)[service pushToAddPerAuthInstitutionsController:@{}]; |
Example/CNLiveBPersonalVerificationModule/CNLiveBPersonalVerificationModule-Info.plist
| @@ -31,6 +31,10 @@ | @@ -31,6 +31,10 @@ | ||
| 31 | <key>NSAllowsArbitraryLoads</key> | 31 | <key>NSAllowsArbitraryLoads</key> |
| 32 | <true/> | 32 | <true/> |
| 33 | </dict> | 33 | </dict> |
| 34 | + <key>NSCameraUsageDescription</key> | ||
| 35 | + <string>需要允许开启相机才能使用拍照功能</string> | ||
| 36 | + <key>NSPhotoLibraryUsageDescription</key> | ||
| 37 | + <string>需要允许打开相册才能访问相册照片和保存照片</string> | ||
| 34 | <key>UILaunchStoryboardName</key> | 38 | <key>UILaunchStoryboardName</key> |
| 35 | <string>LaunchScreen</string> | 39 | <string>LaunchScreen</string> |
| 36 | <key>UIMainStoryboardFile</key> | 40 | <key>UIMainStoryboardFile</key> |