Commit 7249b72d47aecd5676dde4d8027d39fa7b310d05

Authored by 王军波
1 parent 1cf3b9d7

图片相关

CNLiveBPersonalVerificationModule.podspec
@@ -81,45 +81,45 @@ s.subspec 'CNBInstitutionInfo' do |institution| @@ -81,45 +81,45 @@ s.subspec 'CNBInstitutionInfo' do |institution|
81 81
82 end 82 end
83 83
84 -#s.subspec 'CNBPersonCardInfo' do |card|  
85 -# card.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/**'  
86 -# card.subspec 'Controller' do |controller|  
87 -# controller.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/*.{h,m}'  
88 -# controller.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/View'  
89 -# end  
90 -# card.subspec 'View' do |view|  
91 -# view.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/*.{h,m}'  
92 -# view.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/Model'  
93 -# end  
94 -# card.subspec 'Model' do |model|  
95 -# model.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/*.{h,m}'  
96 -# end  
97 -# card.ios.vendored_frameworks = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipOcrSdk.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipBase.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/IdcardQuality.framework'  
98 -# card.resource_bundles = {  
99 -# 'CNBPersonCardInfo' => ['CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle']  
100 -# }  
101 -# card.dependency 'CNLiveTripartiteManagement/Masonry'  
102 -# card.dependency 'CNLiveTripartiteManagement/QMUIKit'  
103 -# card.dependency 'CNLiveTripartiteManagement/MJExtension'  
104 -# card.dependency 'CNLiveTripartiteManagement/SDWebImage'  
105 -# card.dependency 'CNLiveTripartiteManagement/MJRefresh'  
106 -# card.dependency 'CNLiveTripartiteManagement/YYKit'  
107 -# card.dependency 'CNLiveTripartiteManagement/AFNetworking'  
108 -# #基础库  
109 -# card.dependency 'CNLiveBaseKit'  
110 -# #基础类目  
111 -# card.dependency 'CNLiveCommonCategory'  
112 -# ##基础UI  
113 -# card.dependency 'CNLiveCustomUI'  
114 -# ##用户库  
115 -# card.dependency 'CNLiveUserManagement'  
116 -# # #网络请求  
117 -# card.dependency 'CNLiveRequestBastKit'  
118 -# card.dependency 'CNLiveEnvironment'  
119 -# card.dependency 'CNLiveBaseClass'  
120 -# card.dependency 'CNLiveBaseTools'  
121 -# card.dependency 'CNLiveBusinessTools'  
122 -# end 84 +s.subspec 'CNBPersonCardInfo' do |card|
  85 + card.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/**'
  86 + card.subspec 'Controller' do |controller|
  87 + controller.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/*.{h,m}'
  88 + controller.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/View'
  89 + end
  90 + card.subspec 'View' do |view|
  91 + view.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/*.{h,m}'
  92 + view.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/Model'
  93 + end
  94 + card.subspec 'Model' do |model|
  95 + model.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/*.{h,m}'
  96 + end
  97 + card.ios.vendored_frameworks = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipOcrSdk.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipBase.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/IdcardQuality.framework'
  98 + card.resource_bundles = {
  99 + 'CNBPersonCardInfo' => ['CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle']
  100 + }
  101 + card.dependency 'CNLiveTripartiteManagement/Masonry'
  102 + card.dependency 'CNLiveTripartiteManagement/QMUIKit'
  103 + card.dependency 'CNLiveTripartiteManagement/MJExtension'
  104 + card.dependency 'CNLiveTripartiteManagement/SDWebImage'
  105 + card.dependency 'CNLiveTripartiteManagement/MJRefresh'
  106 + card.dependency 'CNLiveTripartiteManagement/YYKit'
  107 + card.dependency 'CNLiveTripartiteManagement/AFNetworking'
  108 + #基础库
  109 + card.dependency 'CNLiveBaseKit'
  110 + #基础类目
  111 + card.dependency 'CNLiveCommonCategory'
  112 + ##基础UI
  113 + card.dependency 'CNLiveCustomUI'
  114 + ##用户库
  115 + card.dependency 'CNLiveUserManagement'
  116 + # #网络请求
  117 + card.dependency 'CNLiveRequestBastKit'
  118 + card.dependency 'CNLiveEnvironment'
  119 + card.dependency 'CNLiveBaseClass'
  120 + card.dependency 'CNLiveBaseTools'
  121 + card.dependency 'CNLiveBusinessTools'
  122 + end
123 123
124 124
125 s.frameworks = 'UIKit', 'Foundation' 125 s.frameworks = 'UIKit', 'Foundation'
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerCertificationController.m
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 } 76 }
77 #pragma mark - Action 77 #pragma mark - Action
78 - (void)sureBtnAction { 78 - (void)sureBtnAction {
79 - 79 + [self.navigationController popToRootViewControllerAnimated:YES];
80 } 80 }
81 #pragma mark - lazy 81 #pragma mark - lazy
82 - (UIImageView *)showImageV { 82 - (UIImageView *)showImageV {
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/ApplyForShootController.m
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 #import "CNUserInfoManager.h" 24 #import "CNUserInfoManager.h"
25 #import "CNLiveBusinessTools.h" 25 #import "CNLiveBusinessTools.h"
26 #import "CNLiveEnvironment.h" 26 #import "CNLiveEnvironment.h"
  27 +#import "CNLiveIDCardAuthGetImage.h"
27 static NSString *shootCellId = @"shootCellId"; 28 static NSString *shootCellId = @"shootCellId";
28 static NSString *confirmCellId = @"confirmCellId"; 29 static NSString *confirmCellId = @"confirmCellId";
29 30
@@ -139,7 +140,7 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -139,7 +140,7 @@ static NSString *confirmCellId = @"confirmCellId";
139 weakSelf.isFontSucc = NO; 140 weakSelf.isFontSucc = NO;
140 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 141 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
141 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 142 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
142 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 143 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
143 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 144 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
144 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 145 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
145 }]; 146 }];
@@ -153,7 +154,7 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -153,7 +154,7 @@ static NSString *confirmCellId = @"confirmCellId";
153 weakSelf.isBackSucc = NO; 154 weakSelf.isBackSucc = NO;
154 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 155 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
155 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 156 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
156 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 157 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
157 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 158 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
158 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 159 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
159 }]; 160 }];
@@ -165,7 +166,7 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -165,7 +166,7 @@ static NSString *confirmCellId = @"confirmCellId";
165 weakSelf.isBackSucc = NO; 166 weakSelf.isBackSucc = NO;
166 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 167 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
167 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 168 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
168 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 169 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
169 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 170 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
170 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 171 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
171 }]; 172 }];
@@ -195,14 +196,14 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -195,14 +196,14 @@ static NSString *confirmCellId = @"confirmCellId";
195 weakSelf.isFontSucc = NO; 196 weakSelf.isFontSucc = NO;
196 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 197 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
197 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 198 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
198 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 199 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
199 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 200 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
200 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 201 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
201 } else { 202 } else {
202 weakSelf.isBackSucc = NO; 203 weakSelf.isBackSucc = NO;
203 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 204 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
204 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 205 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
205 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 206 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
206 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 207 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
207 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 208 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
208 } 209 }
@@ -262,7 +263,7 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -262,7 +263,7 @@ static NSString *confirmCellId = @"confirmCellId";
262 weakSelf.isFontSucc = NO; 263 weakSelf.isFontSucc = NO;
263 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 264 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
264 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 265 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
265 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 266 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
266 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 267 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
267 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 268 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
268 }]; 269 }];
@@ -276,7 +277,7 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -276,7 +277,7 @@ static NSString *confirmCellId = @"confirmCellId";
276 weakSelf.isBackSucc = NO; 277 weakSelf.isBackSucc = NO;
277 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 278 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
278 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 279 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
279 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 280 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
280 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 281 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
281 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 282 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
282 }]; 283 }];
@@ -297,14 +298,14 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -297,14 +298,14 @@ static NSString *confirmCellId = @"confirmCellId";
297 weakSelf.isFontSucc = NO; 298 weakSelf.isFontSucc = NO;
298 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 299 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
299 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 300 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
300 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 301 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
301 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 302 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
302 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 303 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
303 } else { 304 } else {
304 weakSelf.isBackSucc = NO; 305 weakSelf.isBackSucc = NO;
305 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 306 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
306 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 307 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
307 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 308 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
308 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 309 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
309 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 310 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
310 } 311 }
@@ -360,14 +361,14 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -360,14 +361,14 @@ static NSString *confirmCellId = @"confirmCellId";
360 weakSelf.isFontSucc = NO; 361 weakSelf.isFontSucc = NO;
361 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 362 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
362 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 363 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
363 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 364 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
364 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 365 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
365 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 366 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
366 } else { 367 } else {
367 weakSelf.isBackSucc = NO; 368 weakSelf.isBackSucc = NO;
368 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 369 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
369 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 370 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
370 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 371 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
371 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 372 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
372 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 373 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
373 } 374 }
@@ -395,14 +396,14 @@ static NSString *confirmCellId = @"confirmCellId"; @@ -395,14 +396,14 @@ static NSString *confirmCellId = @"confirmCellId";
395 weakSelf.isFontSucc = NO; 396 weakSelf.isFontSucc = NO;
396 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0]; 397 NSIndexPath *index = [NSIndexPath indexPathForRow:0 inSection:0];
397 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 398 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
398 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_front"]; 399 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_front" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
399 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 400 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
400 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 401 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
401 } else { 402 } else {
402 weakSelf.isBackSucc = NO; 403 weakSelf.isBackSucc = NO;
403 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0]; 404 NSIndexPath *index = [NSIndexPath indexPathForRow:1 inSection:0];
404 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index]; 405 ApplyForShootCell *cell = [weakSelf.tableView cellForRowAtIndexPath:index];
405 - cell.imgV.image = [UIImage imageNamed:@"observer_idcard_back"]; 406 + cell.imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"observer_idcard_back" bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
406 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216); 407 weakSelf.confirmCell.confirmButton.backgroundColor = RGB(216, 216, 216);
407 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal]; 408 [weakSelf.confirmCell.confirmButton setTitleColor:RGB(180, 180, 180) forState:UIControlStateNormal];
408 } 409 }
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/ApplyForShootCell.m
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 #import <Masonry/Masonry.h> 11 #import <Masonry/Masonry.h>
12 #import "CNLiveBaseKit.h" 12 #import "CNLiveBaseKit.h"
13 #import <QMUIKit/QMUIKit.h> 13 #import <QMUIKit/QMUIKit.h>
  14 +#import "CNLiveIDCardAuthGetImage.h"
14 @interface ApplyForShootCell () 15 @interface ApplyForShootCell ()
15 16
16 @property (nonatomic, strong) UILabel *titleLab; 17 @property (nonatomic, strong) UILabel *titleLab;
@@ -34,7 +35,7 @@ @@ -34,7 +35,7 @@
34 - (void)setModel:(AgreementModel *)model { 35 - (void)setModel:(AgreementModel *)model {
35 36
36 _titleLab.text = model.shootTitle; 37 _titleLab.text = model.shootTitle;
37 - _imgV.image = [UIImage imageNamed:model.shootImage]; 38 + _imgV.image = [CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:model.shootImage bundle:@"CNBPersonCardInfo.bundle/CNBPersonCardInfo" targetClass:[self class]];
38 if (model.isFront) { 39 if (model.isFront) {
39 self.lineV.hidden = NO; 40 self.lineV.hidden = NO;
40 NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证正面 注意避免证件反光"]; 41 NSMutableAttributedString *str = [[NSMutableAttributedString alloc] initWithString:@"请拍摄本人身份证正面 注意避免证件反光"];
@@ -151,7 +152,7 @@ @@ -151,7 +152,7 @@
151 - (UIButton *)shootBtn { 152 - (UIButton *)shootBtn {
152 if (!_shootBtn) { 153 if (!_shootBtn) {
153 _shootBtn = [UIButton buttonWithType:UIButtonTypeCustom]; 154 _shootBtn = [UIButton buttonWithType:UIButtonTypeCustom];
154 - [_shootBtn setImage:[UIImage imageNamed:@"dl_xiangji"] forState:UIControlStateNormal]; 155 + [_shootBtn setImage:[CNLiveIDCardAuthGetImage cnLiveIDCardAuth_getImageName:@"dl_xiangji" bundle:@"CNBPersonCardInfo.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] forState:UIControlStateNormal];
155 [_shootBtn addTarget:self action:@selector(shootPhotoAction:) forControlEvents:UIControlEventTouchUpInside]; 156 [_shootBtn addTarget:self action:@selector(shootPhotoAction:) forControlEvents:UIControlEventTouchUpInside];
156 } 157 }
157 return _shootBtn; 158 return _shootBtn;
CNLiveIDCardAuthGetImage.h 0 → 100644
  1 +//
  2 +// CNLiveIDCardAuthGetImage.h
  3 +// CNLiveBPersonalVerificationModule
  4 +//
  5 +// Created by cnliveJunBo on 2020/4/22.
  6 +//
  7 +
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +NS_ASSUME_NONNULL_BEGIN
  11 +
  12 +@interface CNLiveIDCardAuthGetImage : NSObject
  13 +
  14 +/// 组件内获取图片
  15 +/// @param imageName 图片名字
  16 +/// @param bundlePath 图片所在bundle
  17 +/// @param targetClass 与bundle在同一级别的class
  18 ++ (UIImage *)cnLiveIDCardAuth_getImageName:(NSString *)imageName bundle:(NSString *)bundlePath targetClass:(Class)targetClass;
  19 +
  20 +@end
  21 +
  22 +NS_ASSUME_NONNULL_END
CNLiveIDCardAuthGetImage.m 0 → 100644
  1 +//
  2 +// CNLiveIDCardAuthGetImage.m
  3 +// CNLiveBPersonalVerificationModule
  4 +//
  5 +// Created by cnliveJunBo on 2020/4/22.
  6 +//
  7 +
  8 +#import "CNLiveIDCardAuthGetImage.h"
  9 +
  10 +@implementation CNLiveIDCardAuthGetImage
  11 +/**
  12 + * 创建图片
  13 + *
  14 + * @param imageName 图片名字
  15 + * @param bundlePath 图片所在的bundle名字
  16 + * @param targetClass 类和bundle的同级目录
  17 + * @return 返回UIImage
  18 + */
  19 ++ (UIImage *)cnLiveIDCardAuth_getImageName:(NSString *)imageName bundle:(NSString *)bundlePath targetClass:(Class)targetClass{
  20 +
  21 + NSInteger scale = [[UIScreen mainScreen]scale];
  22 + NSBundle *bundle = [NSBundle bundleForClass:targetClass];
  23 + NSURL *url = [bundle URLForResource:bundlePath withExtension:@"bundle"];
  24 +
  25 + if (!url) {
  26 + return [UIImage new];
  27 + }
  28 + NSBundle *targetBundle = [NSBundle bundleWithURL:url];
  29 + if (!targetBundle) {
  30 + return [UIImage new];
  31 + }
  32 + NSString *imgName = [NSString stringWithFormat:@"%@@%zdx.png",imageName,scale];
  33 + UIImage *image = [UIImage imageNamed:imgName inBundle:targetBundle compatibleWithTraitCollection:nil];
  34 +
  35 + if (image) {
  36 + return image;
  37 + }else {
  38 + if ([UIImage imageNamed:imgName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil]) {
  39 + return [UIImage imageNamed:imgName inBundle:[NSBundle mainBundle] compatibleWithTraitCollection:nil];
  40 + }else{
  41 + return [UIImage new];
  42 + }
  43 + }
  44 +
  45 +}
  46 +@end