Commit 5e936f0af19460da045b2115449123722fefe41d

Authored by yinqiaojuan
1 parent 9d621164

0.1.6 重试重复问题和未填写数据时,定位到具体位置

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.1.5' 11 + s.version = '0.1.6'
12 s.summary = 'B端个人资料认证开发' 12 s.summary = 'B端个人资料认证开发'
13 13
14 14
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerCertificationController.m
@@ -20,8 +20,6 @@ @@ -20,8 +20,6 @@
20 @end 20 @end
21 21
22 @implementation CNBPerCertificationController 22 @implementation CNBPerCertificationController
23 -  
24 -  
25 - (instancetype)initControllerWithCertificatType:(NSDictionary *)data { 23 - (instancetype)initControllerWithCertificatType:(NSDictionary *)data {
26 if (self = [super init]) { 24 if (self = [super init]) {
27 if (data && [data isKindOfClass:[NSDictionary class]]) { 25 if (data && [data isKindOfClass:[NSDictionary class]]) {
@@ -32,7 +30,6 @@ @@ -32,7 +30,6 @@
32 } 30 }
33 - (void)viewDidAppear:(BOOL)animated { 31 - (void)viewDidAppear:(BOOL)animated {
34 [super viewDidAppear:animated]; 32 [super viewDidAppear:animated];
35 -  
36 if ([self.type isEqualToString:@"2"]) { //审核中禁用手势隐藏返回键 33 if ([self.type isEqualToString:@"2"]) { //审核中禁用手势隐藏返回键
37 self.navigationController.navigationBarHidden = YES; 34 self.navigationController.navigationBarHidden = YES;
38 // 禁用返回手势 35 // 禁用返回手势
@@ -86,7 +83,6 @@ @@ -86,7 +83,6 @@
86 }]; 83 }];
87 self.titleLabel.text = text; 84 self.titleLabel.text = text;
88 [self.sureBtn setTitle:buttonName forState:UIControlStateNormal]; 85 [self.sureBtn setTitle:buttonName forState:UIControlStateNormal];
89 -  
90 } 86 }
91 #pragma mark - 配置UI 87 #pragma mark - 配置UI
92 - (void)configUI { 88 - (void)configUI {
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPersonalVerificationController.m
@@ -82,11 +82,11 @@ @@ -82,11 +82,11 @@
82 - (void)addData:(NSString *)isDelete addSection:(NSString *)addSection{ 82 - (void)addData:(NSString *)isDelete addSection:(NSString *)addSection{
83 NSMutableArray *typeArray = [NSMutableArray array]; 83 NSMutableArray *typeArray = [NSMutableArray array];
84 NSArray *array = @[ 84 NSArray *array = @[
85 - @{@"showType":@"0",@"isDelete":@"0",@"addSection":addSection,@"addRow":@0,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[] 85 + @{@"showType":@"0",@"isDelete":@"0",@"addSection":addSection,@"addRow":@0,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[],@"isRemind":@"0"
86 }, 86 },
87 - @{@"showType":@"1",@"isDelete":@"0",@"addSection":addSection,@"addRow":@1,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[] 87 + @{@"showType":@"1",@"isDelete":@"0",@"addSection":addSection,@"addRow":@1,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[],@"isRemind":@"0"
88 }, 88 },
89 - @{@"showType":@"2",@"isDelete":@"0",@"addSection":addSection,@"addRow":@2,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[] 89 + @{@"showType":@"2",@"isDelete":@"0",@"addSection":addSection,@"addRow":@2,@"institutionsName":@"",@"circleName":@"",@"groupName":@"",@"spId":@"",@"type":@"",@"homePageId":@"",@"groupArray":@[],@"isRemind":@"0"
90 } 90 }
91 // @{@"type":@"3",@"isDelete":@"0"}, 91 // @{@"type":@"3",@"isDelete":@"0"},
92 // @{@"type":@"4",@"isDelete":@"0"} 92 // @{@"type":@"4",@"isDelete":@"0"}
@@ -96,7 +96,7 @@ @@ -96,7 +96,7 @@
96 [typeArray addObject:model]; 96 [typeArray addObject:model];
97 } 97 }
98 NSArray *sectionArray = @[ 98 NSArray *sectionArray = @[
99 - @{@"isDelete":isDelete,@"addSection":addSection,@"typeArray":typeArray,@"institutionName":@"",@"institutionId":@""}, 99 + @{@"isDelete":isDelete,@"addSection":addSection,@"typeArray":typeArray,@"institutionName":@"",@"institutionId":@"",@"isRemind":@"0"},
100 ]; 100 ];
101 for (NSDictionary *dic in sectionArray) { 101 for (NSDictionary *dic in sectionArray) {
102 CNBAddSectionModel *model = [CNBAddSectionModel mj_objectWithKeyValues:dic]; 102 CNBAddSectionModel *model = [CNBAddSectionModel mj_objectWithKeyValues:dic];
@@ -152,6 +152,7 @@ @@ -152,6 +152,7 @@
152 } 152 }
153 cell.typeModel = model; 153 cell.typeModel = model;
154 cell.sectionModel = sectionModel; 154 cell.sectionModel = sectionModel;
  155 +// cell.institutionColor = @"C1C1C1";
155 self.spId = model.spId; 156 self.spId = model.spId;
156 cell.refreshDataBlock = ^{ //选择完机构刷新 157 cell.refreshDataBlock = ^{ //选择完机构刷新
157 [weakSelf.tableView reloadData]; 158 [weakSelf.tableView reloadData];
@@ -203,41 +204,12 @@ @@ -203,41 +204,12 @@
203 addModel.groupName = @""; 204 addModel.groupName = @"";
204 addModel.groupArray = @[]; 205 addModel.groupArray = @[];
205 addModel.homePageId = @""; 206 addModel.homePageId = @"";
  207 + addModel.isRemind = @"0";
206 [typeArray insertObject:addModel atIndex:circleArray.count + 1]; 208 [typeArray insertObject:addModel atIndex:circleArray.count + 1];
207 sectionModel.typeArray = typeArray; 209 sectionModel.typeArray = typeArray;
208 [weakSelf.tableView reloadData]; 210 [weakSelf.tableView reloadData];
209 }; 211 };
210 return circleAddCell; 212 return circleAddCell;
211 - }else if ([model.showType isEqualToString:@"3"]) { //相关账号不会有了 ,已经删除了  
212 - CNBAccountGroupCell *accountCell = [tableView dequeueReusableCellWithIdentifier:CNBAccountGroupIdentifier];  
213 - if (!accountCell) {  
214 - accountCell = [[CNBAccountGroupCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CNBAccountGroupIdentifier];  
215 - }  
216 - __block NSMutableArray *accountTypeArr = [NSMutableArray arrayWithArray:sectionModel.typeArray];  
217 - __weak typeof(self) weakSelf = self;  
218 - accountCell.accountTypeModel = sectionModel.typeArray[indexPath.row];  
219 - accountCell.accountDeleteBlock = ^{  
220 - [accountTypeArr removeObjectAtIndex:indexPath.row];  
221 - sectionModel.typeArray = accountTypeArr;  
222 - [weakSelf.tableView reloadData];  
223 - };  
224 - return accountCell;  
225 - }else if ([model.showType isEqualToString:@"4"]) { //添加相关账号,已经删除了  
226 - CNBAddAccountGroupCell *addAccountCell = [tableView dequeueReusableCellWithIdentifier:CNBAddAccountGroupIdentifier];  
227 - if (!addAccountCell) {  
228 - addAccountCell = [[CNBAddAccountGroupCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CNBAddAccountGroupIdentifier];  
229 - }  
230 - __block NSMutableArray *addGroupArray = [NSMutableArray arrayWithArray:sectionModel.typeArray];  
231 - addAccountCell.addAccountGroupBlock = ^{  
232 - CNBTypeModel *model = [[CNBTypeModel alloc]init];  
233 - model.showType = @"3";  
234 - model.isDelete = @"1";  
235 - [addGroupArray insertObject:model atIndex:addGroupArray.count - 1];  
236 - sectionModel.typeArray = addGroupArray;  
237 - [weakSelf.tableView reloadData];  
238 - };  
239 -  
240 - return addAccountCell;  
241 } 213 }
242 else { 214 else {
243 return nil; 215 return nil;
@@ -308,7 +280,12 @@ @@ -308,7 +280,12 @@
308 for (CNBAddSectionModel *sectionModel in self.sectionArray) { 280 for (CNBAddSectionModel *sectionModel in self.sectionArray) {
309 if (CNLiveStringIsEmpty(sectionModel.institutionId)) { 281 if (CNLiveStringIsEmpty(sectionModel.institutionId)) {
310 [QMUITips showWithText:@"请填写机构信息" inView:CNBAppKeyWindow hideAfterDelay:1.5]; 282 [QMUITips showWithText:@"请填写机构信息" inView:CNBAppKeyWindow hideAfterDelay:1.5];
311 - return ; 283 + sectionModel.isRemind = @"1";
  284 + NSIndexSet *indexSet = [[NSIndexSet alloc]initWithIndex:sectionModel.addSection];
  285 + [self.tableView reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic];
  286 + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:sectionModel.addSection];
  287 + [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
  288 + return;
312 } 289 }
313 NSMutableDictionary *instritutionDic = [NSMutableDictionary dictionary]; 290 NSMutableDictionary *instritutionDic = [NSMutableDictionary dictionary];
314 NSMutableArray *circleArray = [NSMutableArray array]; 291 NSMutableArray *circleArray = [NSMutableArray array];
@@ -330,9 +307,13 @@ @@ -330,9 +307,13 @@
330 [groupDic setObject:groupModel.name forKey:@"groupName"]; 307 [groupDic setObject:groupModel.name forKey:@"groupName"];
331 [groupArray addObject:groupDic]; 308 [groupArray addObject:groupDic];
332 } 309 }
333 - [circleDic setObject:groupArray forKey:@"groupItem"]; 310 + [circleDic setObject:groupArray forKey:@"groupItem"];
334 }else { 311 }else {
335 [QMUITips showWithText:@"请填写圈子群组信息" inView:CNBAppKeyWindow hideAfterDelay:1.5]; 312 [QMUITips showWithText:@"请填写圈子群组信息" inView:CNBAppKeyWindow hideAfterDelay:1.5];
  313 + typeModel.isRemind = @"1";
  314 + NSIndexPath *indexPath = [NSIndexPath indexPathForRow:typeModel.addRow inSection:typeModel.addSection];
  315 + [self.tableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone];
  316 + [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
336 return; 317 return;
337 } 318 }
338 [circleArray addObject:circleDic]; 319 [circleArray addObject:circleDic];
@@ -346,7 +327,7 @@ @@ -346,7 +327,7 @@
346 } 327 }
347 [submitDic setObject:instritutionArray forKey:@"Institution"]; 328 [submitDic setObject:instritutionArray forKey:@"Institution"];
348 [submitDic setObject:CNUserShareModelUid forKey:@"sid"]; 329 [submitDic setObject:CNUserShareModelUid forKey:@"sid"];
349 -// [submitDic setObject:@" 10511059" forKey:@"sid"]; 330 + // [submitDic setObject:@" 10511059" forKey:@"sid"];
350 331
351 NSString *submitStr = [self objectToJson:submitDic]; 332 NSString *submitStr = [self objectToJson:submitDic];
352 333
@@ -385,6 +366,9 @@ @@ -385,6 +366,9 @@
385 _tableView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7"); 366 _tableView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7");
386 [_tableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)]; 367 [_tableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)];
387 [_tableView setSeparatorColor:CNLiveColorWithHexString(@"EDEDED")]; 368 [_tableView setSeparatorColor:CNLiveColorWithHexString(@"EDEDED")];
  369 + [_tableView registerClass:[CNBPersonalVerificationCell class] forCellReuseIdentifier:CNBAffiliationCellIdentifier];
  370 + [_tableView registerClass:[CNBCircleGroupCell class] forCellReuseIdentifier:CNBCircleGroupIdentifier];
  371 + [_tableView registerClass:[CNBCircleAddGroupCell class] forCellReuseIdentifier:CNBCircleAddGroupIdentifier];
388 _footerTBView = [[CNBPerAuthFooterTBView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 168)]; 372 _footerTBView = [[CNBPerAuthFooterTBView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 168)];
389 _footerTBView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7"); 373 _footerTBView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7");
390 __weak typeof(self) weakSelf = self; 374 __weak typeof(self) weakSelf = self;
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Model/CNBIdentifierModel.h
@@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
22 @property (nonatomic, copy) NSString *homePageId; 22 @property (nonatomic, copy) NSString *homePageId;
23 @property (nonatomic, strong) NSArray <CNBPerAuthSelectTypeModel *>*groupArray; //存放groupArray 23 @property (nonatomic, strong) NSArray <CNBPerAuthSelectTypeModel *>*groupArray; //存放groupArray
24 @property (nonatomic, copy) NSString *type; //给后台传的圈子type 24 @property (nonatomic, copy) NSString *type; //给后台传的圈子type
  25 +@property (nonatomic, copy) NSString *isRemind; //没有填写,加粗和加颜色提醒 1提醒 0正常
25 @end 26 @end
26 //添加机构 27 //添加机构
27 @interface CNBAddSectionModel : NSObject 28 @interface CNBAddSectionModel : NSObject
@@ -30,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -30,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN
30 @property (nonatomic, strong) NSMutableArray <CNBTypeModel *>*typeArray; //存放每种类型cell的数组 31 @property (nonatomic, strong) NSMutableArray <CNBTypeModel *>*typeArray; //存放每种类型cell的数组
31 @property (nonatomic, copy) NSString *institutionName; //机构名称 32 @property (nonatomic, copy) NSString *institutionName; //机构名称
32 @property (nonatomic, copy) NSString *institutionId; //机构Id 33 @property (nonatomic, copy) NSString *institutionId; //机构Id
  34 +@property (nonatomic, copy) NSString *isRemind ;// 没有填写,加粗和加颜色提醒 1提醒 0正常
33 @end 35 @end
34 36
35 NS_ASSUME_NONNULL_END 37 NS_ASSUME_NONNULL_END
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPerAuthTypeRadioView.m
@@ -189,6 +189,10 @@ @@ -189,6 +189,10 @@
189 } 189 }
190 #pragma mark - 重试 190 #pragma mark - 重试
191 - (void)retryloadData { 191 - (void)retryloadData {
  192 + if (self.dataSource.count> 0) {
  193 + [self.dataSource removeAllObjects];
  194 + }
  195 + self.page = 1;
192 [self requestTypeListData:self.page]; 196 [self requestTypeListData:self.page];
193 } 197 }
194 #pragma mark - 展示空视图 198 #pragma mark - 展示空视图
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPersonalVerificationCell.m
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 #import "CNBPerAuthTypeRadioView.h" 16 #import "CNBPerAuthTypeRadioView.h"
17 #import "CNBPerAuthManager.h" 17 #import "CNBPerAuthManager.h"
18 #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window 18 #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window
19 -@interface CNBPersonalVerificationCell ()<UITextFieldDelegate> 19 +@interface CNBPersonalVerificationCell ()
20 @property (nonatomic, strong) UIImageView *logoImageV; //是不是必须的标识 20 @property (nonatomic, strong) UIImageView *logoImageV; //是不是必须的标识
21 @property (nonatomic, strong) UILabel *titleLabel; //标题 21 @property (nonatomic, strong) UILabel *titleLabel; //标题
22 @property (nonatomic, strong) CNBPerAuthShowView *institutionsView; //所属机构 22 @property (nonatomic, strong) CNBPerAuthShowView *institutionsView; //所属机构
@@ -69,11 +69,13 @@ @@ -69,11 +69,13 @@
69 if (weakSelf.sectionModel.addSection == typeModel.addSection) { 69 if (weakSelf.sectionModel.addSection == typeModel.addSection) {
70 weakSelf.sectionModel.institutionId = selectModel.typeId; 70 weakSelf.sectionModel.institutionId = selectModel.typeId;
71 weakSelf.sectionModel.institutionName = selectModel.name; 71 weakSelf.sectionModel.institutionName = selectModel.name;
  72 + weakSelf.sectionModel.isRemind = @"0";
72 for (CNBTypeModel * circleModel in weakSelf.sectionModel.typeArray) { 73 for (CNBTypeModel * circleModel in weakSelf.sectionModel.typeArray) {
73 circleModel.circleName = @""; 74 circleModel.circleName = @"";
74 circleModel.homePageId = @""; 75 circleModel.homePageId = @"";
75 circleModel.groupName = @""; 76 circleModel.groupName = @"";
76 circleModel.groupArray = @[]; //如果点击切换了机构,就将圈子和群组的数据都清空 77 circleModel.groupArray = @[]; //如果点击切换了机构,就将圈子和群组的数据都清空
  78 + circleModel.isRemind = @"0";
77 } 79 }
78 if ([CNBPerAuthManager shareManager].circleDic && [[[CNBPerAuthManager shareManager].circleDic allKeys]containsObject:[NSString stringWithFormat:@"%ld",typeModel.addSection]]) { 80 if ([CNBPerAuthManager shareManager].circleDic && [[[CNBPerAuthManager shareManager].circleDic allKeys]containsObject:[NSString stringWithFormat:@"%ld",typeModel.addSection]]) {
79 [[CNBPerAuthManager shareManager].circleDic removeObjectForKey:[NSString stringWithFormat:@"%ld",typeModel.addSection]]; //删除存储的圈子信息 81 [[CNBPerAuthManager shareManager].circleDic removeObjectForKey:[NSString stringWithFormat:@"%ld",typeModel.addSection]]; //删除存储的圈子信息
@@ -94,6 +96,13 @@ @@ -94,6 +96,13 @@
94 } 96 }
95 - (void)setSectionModel:(CNBAddSectionModel *)sectionModel { 97 - (void)setSectionModel:(CNBAddSectionModel *)sectionModel {
96 _sectionModel = sectionModel; 98 _sectionModel = sectionModel;
  99 + if ([sectionModel.isRemind isEqualToString:@"0"]) {
  100 + _institutionsView.layer.borderWidth = 0.5;
  101 + _institutionsView.layer.borderColor = CNLiveColorWithHexString(@"C1C1C1").CGColor;
  102 + }else {
  103 + _institutionsView.layer.borderWidth = 1;
  104 + _institutionsView.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor;
  105 + }
97 } 106 }
98 - (void)setTypeModel:(CNBTypeModel *)typeModel { 107 - (void)setTypeModel:(CNBTypeModel *)typeModel {
99 _typeModel = typeModel; 108 _typeModel = typeModel;
@@ -239,6 +248,13 @@ static const NSInteger CNBGroupTag = 202; @@ -239,6 +248,13 @@ static const NSInteger CNBGroupTag = 202;
239 self.groupView.showLabel.text = typeModel.groupName; 248 self.groupView.showLabel.text = typeModel.groupName;
240 self.groupView.showLabel.textColor = CNLiveColorWithHexString(@"333333"); 249 self.groupView.showLabel.textColor = CNLiveColorWithHexString(@"333333");
241 } 250 }
  251 + if ([typeModel.isRemind isEqualToString:@"0"]) {
  252 + _groupView.layer.borderWidth = 0.5;
  253 + _groupView.layer.borderColor = CNLiveColorWithHexString(@"C1C1C1").CGColor;
  254 + }else {
  255 + _groupView.layer.borderWidth = 1;
  256 + _groupView.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor;
  257 + }
242 } 258 }
243 #pragma mark - Action 259 #pragma mark - Action
244 - (void)deleteBtnAction { 260 - (void)deleteBtnAction {
@@ -261,6 +277,7 @@ static const NSInteger CNBGroupTag = 202; @@ -261,6 +277,7 @@ static const NSInteger CNBGroupTag = 202;
261 weakSelf.typeModel.homePageId = selectModel.typeId; 277 weakSelf.typeModel.homePageId = selectModel.typeId;
262 weakSelf.typeModel.type = selectModel.type; 278 weakSelf.typeModel.type = selectModel.type;
263 weakSelf.typeModel.groupName = @""; 279 weakSelf.typeModel.groupName = @"";
  280 + weakSelf.typeModel.isRemind = @"0";
264 weakSelf.typeModel.groupArray = @[]; //切换圈子删掉群组信息 281 weakSelf.typeModel.groupArray = @[]; //切换圈子删掉群组信息
265 if (weakSelf.refreshDataBlock) { 282 if (weakSelf.refreshDataBlock) {
266 weakSelf.refreshDataBlock(); 283 weakSelf.refreshDataBlock();
@@ -289,6 +306,7 @@ static const NSInteger CNBGroupTag = 202; @@ -289,6 +306,7 @@ static const NSInteger CNBGroupTag = 202;
289 if (weakSelf.typeModel.addRow == typeMoedl.addRow) { 306 if (weakSelf.typeModel.addRow == typeMoedl.addRow) {
290 weakSelf.typeModel.groupName = [nameArray componentsJoinedByString:@","]; 307 weakSelf.typeModel.groupName = [nameArray componentsJoinedByString:@","];
291 weakSelf.typeModel.groupArray = groupArray; 308 weakSelf.typeModel.groupArray = groupArray;
  309 + weakSelf.typeModel.isRemind = @"0";
292 if (weakSelf.refreshDataBlock) { 310 if (weakSelf.refreshDataBlock) {
293 weakSelf.refreshDataBlock(); 311 weakSelf.refreshDataBlock();
294 } 312 }