Commit 5e936f0af19460da045b2115449123722fefe41d
1 parent
9d621164
0.1.6 重试重复问题和未填写数据时,定位到具体位置
Showing
6 changed files
with
47 additions
and
43 deletions
CNLiveBPersonalVerificationModule.podspec
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerCertificationController.m
| ... | ... | @@ -20,8 +20,6 @@ |
| 20 | 20 | @end |
| 21 | 21 | |
| 22 | 22 | @implementation CNBPerCertificationController |
| 23 | - | |
| 24 | - | |
| 25 | 23 | - (instancetype)initControllerWithCertificatType:(NSDictionary *)data { |
| 26 | 24 | if (self = [super init]) { |
| 27 | 25 | if (data && [data isKindOfClass:[NSDictionary class]]) { |
| ... | ... | @@ -32,7 +30,6 @@ |
| 32 | 30 | } |
| 33 | 31 | - (void)viewDidAppear:(BOOL)animated { |
| 34 | 32 | [super viewDidAppear:animated]; |
| 35 | - | |
| 36 | 33 | if ([self.type isEqualToString:@"2"]) { //审核中禁用手势隐藏返回键 |
| 37 | 34 | self.navigationController.navigationBarHidden = YES; |
| 38 | 35 | // 禁用返回手势 |
| ... | ... | @@ -86,7 +83,6 @@ |
| 86 | 83 | }]; |
| 87 | 84 | self.titleLabel.text = text; |
| 88 | 85 | [self.sureBtn setTitle:buttonName forState:UIControlStateNormal]; |
| 89 | - | |
| 90 | 86 | } |
| 91 | 87 | #pragma mark - 配置UI |
| 92 | 88 | - (void)configUI { | ... | ... |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPersonalVerificationController.m
| ... | ... | @@ -82,11 +82,11 @@ |
| 82 | 82 | - (void)addData:(NSString *)isDelete addSection:(NSString *)addSection{ |
| 83 | 83 | NSMutableArray *typeArray = [NSMutableArray array]; |
| 84 | 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 | 91 | // @{@"type":@"3",@"isDelete":@"0"}, |
| 92 | 92 | // @{@"type":@"4",@"isDelete":@"0"} |
| ... | ... | @@ -96,7 +96,7 @@ |
| 96 | 96 | [typeArray addObject:model]; |
| 97 | 97 | } |
| 98 | 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 | 101 | for (NSDictionary *dic in sectionArray) { |
| 102 | 102 | CNBAddSectionModel *model = [CNBAddSectionModel mj_objectWithKeyValues:dic]; |
| ... | ... | @@ -152,6 +152,7 @@ |
| 152 | 152 | } |
| 153 | 153 | cell.typeModel = model; |
| 154 | 154 | cell.sectionModel = sectionModel; |
| 155 | +// cell.institutionColor = @"C1C1C1"; | |
| 155 | 156 | self.spId = model.spId; |
| 156 | 157 | cell.refreshDataBlock = ^{ //选择完机构刷新 |
| 157 | 158 | [weakSelf.tableView reloadData]; |
| ... | ... | @@ -203,41 +204,12 @@ |
| 203 | 204 | addModel.groupName = @""; |
| 204 | 205 | addModel.groupArray = @[]; |
| 205 | 206 | addModel.homePageId = @""; |
| 207 | + addModel.isRemind = @"0"; | |
| 206 | 208 | [typeArray insertObject:addModel atIndex:circleArray.count + 1]; |
| 207 | 209 | sectionModel.typeArray = typeArray; |
| 208 | 210 | [weakSelf.tableView reloadData]; |
| 209 | 211 | }; |
| 210 | 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 | 214 | else { |
| 243 | 215 | return nil; |
| ... | ... | @@ -308,7 +280,12 @@ |
| 308 | 280 | for (CNBAddSectionModel *sectionModel in self.sectionArray) { |
| 309 | 281 | if (CNLiveStringIsEmpty(sectionModel.institutionId)) { |
| 310 | 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 | 290 | NSMutableDictionary *instritutionDic = [NSMutableDictionary dictionary]; |
| 314 | 291 | NSMutableArray *circleArray = [NSMutableArray array]; |
| ... | ... | @@ -330,9 +307,13 @@ |
| 330 | 307 | [groupDic setObject:groupModel.name forKey:@"groupName"]; |
| 331 | 308 | [groupArray addObject:groupDic]; |
| 332 | 309 | } |
| 333 | - [circleDic setObject:groupArray forKey:@"groupItem"]; | |
| 310 | + [circleDic setObject:groupArray forKey:@"groupItem"]; | |
| 334 | 311 | }else { |
| 335 | 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 | 317 | return; |
| 337 | 318 | } |
| 338 | 319 | [circleArray addObject:circleDic]; |
| ... | ... | @@ -346,7 +327,7 @@ |
| 346 | 327 | } |
| 347 | 328 | [submitDic setObject:instritutionArray forKey:@"Institution"]; |
| 348 | 329 | [submitDic setObject:CNUserShareModelUid forKey:@"sid"]; |
| 349 | -// [submitDic setObject:@" 10511059" forKey:@"sid"]; | |
| 330 | + // [submitDic setObject:@" 10511059" forKey:@"sid"]; | |
| 350 | 331 | |
| 351 | 332 | NSString *submitStr = [self objectToJson:submitDic]; |
| 352 | 333 | |
| ... | ... | @@ -385,6 +366,9 @@ |
| 385 | 366 | _tableView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7"); |
| 386 | 367 | [_tableView setSeparatorInset:UIEdgeInsetsMake(0, 0, 0, 0)]; |
| 387 | 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 | 372 | _footerTBView = [[CNBPerAuthFooterTBView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, 168)]; |
| 389 | 373 | _footerTBView.backgroundColor = CNLiveColorWithHexString(@"F7F7F7"); |
| 390 | 374 | __weak typeof(self) weakSelf = self; | ... | ... |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Model/CNBIdentifierModel.h
| ... | ... | @@ -22,6 +22,7 @@ NS_ASSUME_NONNULL_BEGIN |
| 22 | 22 | @property (nonatomic, copy) NSString *homePageId; |
| 23 | 23 | @property (nonatomic, strong) NSArray <CNBPerAuthSelectTypeModel *>*groupArray; //存放groupArray |
| 24 | 24 | @property (nonatomic, copy) NSString *type; //给后台传的圈子type |
| 25 | +@property (nonatomic, copy) NSString *isRemind; //没有填写,加粗和加颜色提醒 1提醒 0正常 | |
| 25 | 26 | @end |
| 26 | 27 | //添加机构 |
| 27 | 28 | @interface CNBAddSectionModel : NSObject |
| ... | ... | @@ -30,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN |
| 30 | 31 | @property (nonatomic, strong) NSMutableArray <CNBTypeModel *>*typeArray; //存放每种类型cell的数组 |
| 31 | 32 | @property (nonatomic, copy) NSString *institutionName; //机构名称 |
| 32 | 33 | @property (nonatomic, copy) NSString *institutionId; //机构Id |
| 34 | +@property (nonatomic, copy) NSString *isRemind ;// 没有填写,加粗和加颜色提醒 1提醒 0正常 | |
| 33 | 35 | @end |
| 34 | 36 | |
| 35 | 37 | NS_ASSUME_NONNULL_END | ... | ... |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPerAuthTypeRadioView.m
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPersonalVerificationCell.m
| ... | ... | @@ -16,7 +16,7 @@ |
| 16 | 16 | #import "CNBPerAuthTypeRadioView.h" |
| 17 | 17 | #import "CNBPerAuthManager.h" |
| 18 | 18 | #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window |
| 19 | -@interface CNBPersonalVerificationCell ()<UITextFieldDelegate> | |
| 19 | +@interface CNBPersonalVerificationCell () | |
| 20 | 20 | @property (nonatomic, strong) UIImageView *logoImageV; //是不是必须的标识 |
| 21 | 21 | @property (nonatomic, strong) UILabel *titleLabel; //标题 |
| 22 | 22 | @property (nonatomic, strong) CNBPerAuthShowView *institutionsView; //所属机构 |
| ... | ... | @@ -69,11 +69,13 @@ |
| 69 | 69 | if (weakSelf.sectionModel.addSection == typeModel.addSection) { |
| 70 | 70 | weakSelf.sectionModel.institutionId = selectModel.typeId; |
| 71 | 71 | weakSelf.sectionModel.institutionName = selectModel.name; |
| 72 | + weakSelf.sectionModel.isRemind = @"0"; | |
| 72 | 73 | for (CNBTypeModel * circleModel in weakSelf.sectionModel.typeArray) { |
| 73 | 74 | circleModel.circleName = @""; |
| 74 | 75 | circleModel.homePageId = @""; |
| 75 | 76 | circleModel.groupName = @""; |
| 76 | 77 | circleModel.groupArray = @[]; //如果点击切换了机构,就将圈子和群组的数据都清空 |
| 78 | + circleModel.isRemind = @"0"; | |
| 77 | 79 | } |
| 78 | 80 | if ([CNBPerAuthManager shareManager].circleDic && [[[CNBPerAuthManager shareManager].circleDic allKeys]containsObject:[NSString stringWithFormat:@"%ld",typeModel.addSection]]) { |
| 79 | 81 | [[CNBPerAuthManager shareManager].circleDic removeObjectForKey:[NSString stringWithFormat:@"%ld",typeModel.addSection]]; //删除存储的圈子信息 |
| ... | ... | @@ -94,6 +96,13 @@ |
| 94 | 96 | } |
| 95 | 97 | - (void)setSectionModel:(CNBAddSectionModel *)sectionModel { |
| 96 | 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 | 107 | - (void)setTypeModel:(CNBTypeModel *)typeModel { |
| 99 | 108 | _typeModel = typeModel; |
| ... | ... | @@ -239,6 +248,13 @@ static const NSInteger CNBGroupTag = 202; |
| 239 | 248 | self.groupView.showLabel.text = typeModel.groupName; |
| 240 | 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 | 259 | #pragma mark - Action |
| 244 | 260 | - (void)deleteBtnAction { |
| ... | ... | @@ -261,6 +277,7 @@ static const NSInteger CNBGroupTag = 202; |
| 261 | 277 | weakSelf.typeModel.homePageId = selectModel.typeId; |
| 262 | 278 | weakSelf.typeModel.type = selectModel.type; |
| 263 | 279 | weakSelf.typeModel.groupName = @""; |
| 280 | + weakSelf.typeModel.isRemind = @"0"; | |
| 264 | 281 | weakSelf.typeModel.groupArray = @[]; //切换圈子删掉群组信息 |
| 265 | 282 | if (weakSelf.refreshDataBlock) { |
| 266 | 283 | weakSelf.refreshDataBlock(); |
| ... | ... | @@ -289,6 +306,7 @@ static const NSInteger CNBGroupTag = 202; |
| 289 | 306 | if (weakSelf.typeModel.addRow == typeMoedl.addRow) { |
| 290 | 307 | weakSelf.typeModel.groupName = [nameArray componentsJoinedByString:@","]; |
| 291 | 308 | weakSelf.typeModel.groupArray = groupArray; |
| 309 | + weakSelf.typeModel.isRemind = @"0"; | |
| 292 | 310 | if (weakSelf.refreshDataBlock) { |
| 293 | 311 | weakSelf.refreshDataBlock(); |
| 294 | 312 | } | ... | ... |