Commit 228bb539b54514621c334883b95f77a817b21693

Authored by yinqiaojuan
1 parent e63922c7

0.0.2 修改一些UI问题

Showing 12 changed files with 54 additions and 27 deletions
CNLiveBPersonalVerificationModule.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveBPersonalVerificationModule' 10 s.name = 'CNLiveBPersonalVerificationModule'
11 - s.version = '0.0.1' 11 + s.version = '0.0.2'
12 s.summary = 'B端个人资料认证开发' 12 s.summary = 'B端个人资料认证开发'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
@@ -75,7 +75,7 @@ s.subspec 'CNBInstitutionInfo' do |institution| @@ -75,7 +75,7 @@ s.subspec 'CNBInstitutionInfo' do |institution|
75 # #协议库 75 # #协议库
76 institution.dependency 'CNLiveBeeHive' 76 institution.dependency 'CNLiveBeeHive'
77 institution.dependency 'CNLiveBServices' 77 institution.dependency 'CNLiveBServices'
78 -institution.resource_bundles = { 78 + institution.resource_bundles = {
79 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle'] 79 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle']
80 } 80 }
81 81
@@ -96,7 +96,7 @@ s.subspec 'CNBPersonCardInfo' do |card| @@ -96,7 +96,7 @@ s.subspec 'CNBPersonCardInfo' do |card|
96 end 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' 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 = { 98 card.resource_bundles = {
99 - 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle'] 99 + 'CNBPersonCardInfo' => ['CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle']
100 } 100 }
101 card.dependency 'CNLiveTripartiteManagement/Masonry' 101 card.dependency 'CNLiveTripartiteManagement/Masonry'
102 card.dependency 'CNLiveTripartiteManagement/QMUIKit' 102 card.dependency 'CNLiveTripartiteManagement/QMUIKit'
CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/delete@2x.png renamed to CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/CNBPerdelete@2x.png

814 Bytes

CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/delete@3x.png renamed to CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/CNBPerdelete@3x.png

1.31 KB

CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/zhuangtai_kong@2x.png 0 → 100644

20.7 KB

CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle/zhuangtai_kong@3x.png 0 → 100644

41.3 KB

CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerAuthSuccessController.m
@@ -46,14 +46,22 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; @@ -46,14 +46,22 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
46 [self.view addSubview:self.tableView]; 46 [self.view addSubview:self.tableView];
47 self.title = @"身份校验"; 47 self.title = @"身份校验";
48 if (self.data && [self.data isKindOfClass:[NSDictionary class]] && self.data.count > 0) { 48 if (self.data && [self.data isKindOfClass:[NSDictionary class]] && self.data.count > 0) {
49 - CNBPerCertificationSuccessModel *successModel = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:self.data];  
50 - self.infoModel = successModel.bUserIdentity;  
51 - for (CNBInstitutionModel *model in successModel.institution) {  
52 - [self.institutionArray addObject:model]; 49 + if ([[self.data allKeys] containsObject:@"institution"]) {
  50 + NSArray *array = self.data[@"institution"];
  51 + if (array.count > 0) {
  52 + CNBPerCertificationSuccessModel *successModel = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:self.data];
  53 + self.infoModel = successModel.bUserIdentity;
  54 + for (CNBInstitutionModel *model in successModel.institution) {
  55 + [self.institutionArray addObject:model];
  56 + }
  57 + [self.institutionArray insertObject:successModel.bUserIdentity atIndex:0];
  58 + [self.tableView reloadData];
  59 + }else {
  60 + [self showEmptyView:CNBPerAuthErrorTypeNoData];
  61 + }
  62 + }else {
  63 + [self showEmptyView:CNBPerAuthErrorTypeNoData];
53 } 64 }
54 - [self.institutionArray insertObject:successModel.bUserIdentity atIndex:0];  
55 - [self.tableView reloadData];  
56 -  
57 }else { 65 }else {
58 [self requestPerAuthSuccessData]; 66 [self requestPerAuthSuccessData];
59 } 67 }
@@ -66,14 +74,25 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; @@ -66,14 +74,25 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
66 if (!strongSelf) { 74 if (!strongSelf) {
67 return ; 75 return ;
68 } 76 }
69 - CNBPerCertificationSuccessModel *successModel = dataArray[0];  
70 - strongSelf.infoModel = successModel.bUserIdentity;  
71 - for (CNBInstitutionModel *model in successModel.institution) {  
72 - [strongSelf.institutionArray addObject:model]; 77 + if (dataArray.count > 0) {
  78 + CNBPerCertificationSuccessModel *successModel = dataArray[0];
  79 + if (successModel.bUserIdentity && successModel.institution.count > 0) {
  80 + strongSelf.infoModel = successModel.bUserIdentity;
  81 + for (CNBInstitutionModel *model in successModel.institution) {
  82 + [strongSelf.institutionArray addObject:model];
  83 + }
  84 + [strongSelf.emptyView removeFromSuperview ];
  85 + strongSelf.tableView.tableFooterView = [UIView new];
  86 + [strongSelf.institutionArray insertObject:successModel.bUserIdentity atIndex:0];
  87 + [strongSelf.tableView reloadData];
  88 + }else {
  89 + [strongSelf showEmptyView:CNBPerAuthErrorTypeNoData];
  90 + }
  91 +
  92 + }else {
  93 + [strongSelf showEmptyView:CNBPerAuthErrorTypeNoData];
73 } 94 }
74 - [strongSelf.emptyView removeFromSuperview ];  
75 - [strongSelf.institutionArray insertObject:successModel.bUserIdentity atIndex:0];  
76 - [strongSelf.tableView reloadData]; 95 +
77 } failureBlock:^(NSError * _Nonnull error) { 96 } failureBlock:^(NSError * _Nonnull error) {
78 if (error.code == -1009 || error.code == -1001) { 97 if (error.code == -1009 || error.code == -1001) {
79 [weakSelf showEmptyView:CNBPerAuthErrorTypeNoNet]; 98 [weakSelf showEmptyView:CNBPerAuthErrorTypeNoNet];
@@ -99,8 +118,14 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; @@ -99,8 +118,14 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
99 imageName = @"wufalianjie"; 118 imageName = @"wufalianjie";
100 titleName = @"接口开小差了,试试重新请求"; 119 titleName = @"接口开小差了,试试重新请求";
101 retryName = @"重试"; 120 retryName = @"重试";
  121 + }else if (errorType == CNBPerAuthErrorTypeNoData) {
  122 + imageName = @"zhuangtai_kong";
  123 + titleName = @"暂无您的身份内容";
  124 + retryName = @"";
102 } 125 }
103 [self.emptyView showImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:imageName bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] title:titleName detailTitle:@"" retryBtnTitle:retryName]; 126 [self.emptyView showImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:imageName bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] title:titleName detailTitle:@"" retryBtnTitle:retryName];
  127 + BOOL isHidden = errorType == CNBPerAuthErrorTypeNoData;
  128 + self.emptyView.retryBtn.hidden = isHidden;
104 self.emptyView.retryBtn.backgroundColor = kWhiteColor; 129 self.emptyView.retryBtn.backgroundColor = kWhiteColor;
105 self.emptyView.retryBtn.layer.masksToBounds = YES; 130 self.emptyView.retryBtn.layer.masksToBounds = YES;
106 self.emptyView.retryBtn.layer.cornerRadius = 14; 131 self.emptyView.retryBtn.layer.cornerRadius = 14;
@@ -108,7 +133,7 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; @@ -108,7 +133,7 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
108 self.emptyView.retryBtn.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor; 133 self.emptyView.retryBtn.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor;
109 [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateNormal]; 134 [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateNormal];
110 [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateHighlighted]; 135 [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateHighlighted];
111 - [self.view addSubview:self.emptyView]; 136 + errorType == CNBPerAuthErrorTypeNoData ? self.tableView.tableFooterView = self.emptyView :[self.view addSubview:self.emptyView];
112 [self.emptyView.retryBtn addTarget:self action:@selector(retryloadData) forControlEvents:UIControlEventTouchUpInside]; 137 [self.emptyView.retryBtn addTarget:self action:@selector(retryloadData) forControlEvents:UIControlEventTouchUpInside];
113 } 138 }
114 #pragma mark - tableViewDelegateAndDataSource 139 #pragma mark - tableViewDelegateAndDataSource
@@ -221,7 +246,8 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; @@ -221,7 +246,8 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
221 } 246 }
222 - (CNEmptyView *)emptyView { 247 - (CNEmptyView *)emptyView {
223 if (!_emptyView) { 248 if (!_emptyView) {
224 - _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight - kNavigationBarHeight) type:1]; 249 + _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, kNavigationBarHeight, KScreenWidth, KScreenHeight - kNavigationBarHeight) type:0];
  250 + _emptyView.backgroundColor = [UIColor whiteColor];
225 } 251 }
226 return _emptyView; 252 return _emptyView;
227 } 253 }
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPersonalVerificationController.m
@@ -324,8 +324,7 @@ @@ -324,8 +324,7 @@
324 [instritutionArray addObject:instritutionDic]; 324 [instritutionArray addObject:instritutionDic];
325 } 325 }
326 [submitDic setObject:instritutionArray forKey:@"Institution"]; 326 [submitDic setObject:instritutionArray forKey:@"Institution"];
327 - [submitDic setObject:@"10511059" forKey:@"sid"];  
328 - 327 + [submitDic setObject:CNUserShareModelUid forKey:@"sid"];
329 NSString *submitStr = [self objectToJson:submitDic]; 328 NSString *submitStr = [self objectToJson:submitDic];
330 submitStr = [submitStr stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"]; 329 submitStr = [submitStr stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"];
331 __weak typeof(self) weakSelf = self; 330 __weak typeof(self) weakSelf = self;
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Services/CNBPersonAuthenticationServices.h
@@ -10,7 +10,6 @@ @@ -10,7 +10,6 @@
10 NS_ASSUME_NONNULL_BEGIN 10 NS_ASSUME_NONNULL_BEGIN
11 11
12 @interface CNBPersonAuthenticationServices : NSObject 12 @interface CNBPersonAuthenticationServices : NSObject
13 -  
14 @end 13 @end
15 14
16 NS_ASSUME_NONNULL_END 15 NS_ASSUME_NONNULL_END
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPerAuthHeaderView.m
@@ -78,7 +78,7 @@ @@ -78,7 +78,7 @@
78 - (QMUIButton *)deleteBtn { 78 - (QMUIButton *)deleteBtn {
79 if (!_deleteBtn) { 79 if (!_deleteBtn) {
80 _deleteBtn = [[QMUIButton alloc]init]; 80 _deleteBtn = [[QMUIButton alloc]init];
81 - [_deleteBtn setImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:@"delete" bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] forState:UIControlStateNormal]; 81 + [_deleteBtn setImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:@"CNBPerdelete" bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] forState:UIControlStateNormal];
82 [_deleteBtn addTarget:self action:@selector(deleteBtnAction) forControlEvents:UIControlEventTouchUpInside]; 82 [_deleteBtn addTarget:self action:@selector(deleteBtnAction) forControlEvents:UIControlEventTouchUpInside];
83 _deleteBtn.hidden = YES; 83 _deleteBtn.hidden = YES;
84 } 84 }
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPerAuthTypeRadioView.m
@@ -468,7 +468,8 @@ @@ -468,7 +468,8 @@
468 } 468 }
469 - (CNEmptyView *)emptyView { 469 - (CNEmptyView *)emptyView {
470 if (!_emptyView) { 470 if (!_emptyView) {
471 - _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, KScreenHeight/4 +kNavigationBarHeight, KScreenWidth, KScreenHeight*3/4 - kNavigationBarHeight - kVerticalBottomSafeHeight) type:1]; 471 + _emptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, KScreenHeight/4 +kNavigationBarHeight + 40, KScreenWidth, KScreenHeight*3/4 - kNavigationBarHeight - kVerticalBottomSafeHeight - 40) type:0];
  472 + _emptyView.backgroundColor = [UIColor whiteColor];
472 } 473 }
473 return _emptyView; 474 return _emptyView;
474 } 475 }
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthViewModel.m
@@ -13,6 +13,7 @@ @@ -13,6 +13,7 @@
13 #import "CNBPerCertificationSuccessModel.h" 13 #import "CNBPerCertificationSuccessModel.h"
14 #import "CNLiveBaseKit.h" 14 #import "CNLiveBaseKit.h"
15 #import "CNLiveEnvironment.h" 15 #import "CNLiveEnvironment.h"
  16 +#import "CNUserInfoManager.h"
16 #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window 17 #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window
17 @implementation CNBPerAuthViewModel 18 @implementation CNBPerAuthViewModel
18 #pragma mark - 请求机构等列表 19 #pragma mark - 请求机构等列表
@@ -21,8 +22,8 @@ @@ -21,8 +22,8 @@
21 @"spId": CNLiveStringIsEmpty(spId) ? @"": spId, 22 @"spId": CNLiveStringIsEmpty(spId) ? @"": spId,
22 @"type" : CNLiveStringIsEmpty(type) ? @"": type, 23 @"type" : CNLiveStringIsEmpty(type) ? @"": type,
23 @"homepageId":CNLiveStringIsEmpty(homepageId) ? @"": homepageId, 24 @"homepageId":CNLiveStringIsEmpty(homepageId) ? @"": homepageId,
24 - @"page": [NSString stringWithFormat:@"%ld",page],  
25 - @"pageSize":[NSString stringWithFormat:@"%d",10], 25 + @"page": [NSString stringWithFormat:@"%ld",(long)page],
  26 + @"pageSize":[NSString stringWithFormat:@"%d",10]
26 }; 27 };
27 28
28 [CNLiveNetworking setupShowDataResult:NO]; 29 [CNLiveNetworking setupShowDataResult:NO];
@@ -83,6 +84,7 @@ @@ -83,6 +84,7 @@
83 + (void)getPerAuthSuccessList:(void (^)(NSMutableArray *dataArray))successBlock failureBlock:(void (^)(NSError * error))failureBlock { 84 + (void)getPerAuthSuccessList:(void (^)(NSMutableArray *dataArray))successBlock failureBlock:(void (^)(NSError * error))failureBlock {
84 NSDictionary *param = @{ 85 NSDictionary *param = @{
85 @"sid":@"10513196" 86 @"sid":@"10513196"
  87 +// @"sid":CNUserShareModelUid
86 }; 88 };
87 [CNLiveNetworking setupShowDataResult:NO]; 89 [CNLiveNetworking setupShowDataResult:NO];
88 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 90 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -98,7 +100,6 @@ @@ -98,7 +100,6 @@
98 if (responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]) { 100 if (responseObject[@"data"] && [responseObject[@"data"] isKindOfClass:[NSDictionary class]]) {
99 CNBPerCertificationSuccessModel *model = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:responseObject[@"data"]]; 101 CNBPerCertificationSuccessModel *model = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:responseObject[@"data"]];
100 [array addObject:model]; 102 [array addObject:model];
101 -  
102 } 103 }
103 !successBlock ? :successBlock(array); 104 !successBlock ? :successBlock(array);
104 }else { 105 }else {
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNLivePerAuthGetImage.m
@@ -31,6 +31,7 @@ @@ -31,6 +31,7 @@
31 } 31 }
32 NSString *imgName = [NSString stringWithFormat:@"%@@%zdx.png",imageName,scale]; 32 NSString *imgName = [NSString stringWithFormat:@"%@@%zdx.png",imageName,scale];
33 UIImage *image = [UIImage imageNamed:imgName inBundle:targetBundle compatibleWithTraitCollection:nil]; 33 UIImage *image = [UIImage imageNamed:imgName inBundle:targetBundle compatibleWithTraitCollection:nil];
  34 +
34 if (image) { 35 if (image) {
35 return image; 36 return image;
36 }else { 37 }else {