Commit 39aa05327d121ebce4ea50a4a5bfb9323499f7ef
1 parent
82494e32
修改个人认证bug
Showing
10 changed files
with
76 additions
and
69 deletions
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerAuthSuccessController.m
| @@ -48,7 +48,7 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | @@ -48,7 +48,7 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | ||
| 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 | if ([[self.data allKeys] containsObject:@"institution"]) { | 49 | if ([[self.data allKeys] containsObject:@"institution"]) { |
| 50 | NSArray *array = self.data[@"institution"]; | 50 | NSArray *array = self.data[@"institution"]; |
| 51 | - if (array.count > 0) { | 51 | + if (array.count > 0 ) { |
| 52 | CNBPerCertificationSuccessModel *successModel = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:self.data]; | 52 | CNBPerCertificationSuccessModel *successModel = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:self.data]; |
| 53 | self.infoModel = successModel.bUserIdentity; | 53 | self.infoModel = successModel.bUserIdentity; |
| 54 | for (CNBInstitutionModel *model in successModel.institution) { | 54 | for (CNBInstitutionModel *model in successModel.institution) { |
| @@ -57,10 +57,10 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | @@ -57,10 +57,10 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | ||
| 57 | [self.institutionArray insertObject:successModel.bUserIdentity atIndex:0]; | 57 | [self.institutionArray insertObject:successModel.bUserIdentity atIndex:0]; |
| 58 | [self.tableView reloadData]; | 58 | [self.tableView reloadData]; |
| 59 | }else { | 59 | }else { |
| 60 | - [self showEmptyView:CNBPerAuthErrorTypeNoData]; | 60 | + [self requestPerAuthSuccessData]; |
| 61 | } | 61 | } |
| 62 | }else { | 62 | }else { |
| 63 | - [self showEmptyView:CNBPerAuthErrorTypeNoData]; | 63 | + [self requestPerAuthSuccessData]; |
| 64 | } | 64 | } |
| 65 | }else { | 65 | }else { |
| 66 | [self requestPerAuthSuccessData]; | 66 | [self requestPerAuthSuccessData]; |
| @@ -175,7 +175,21 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | @@ -175,7 +175,21 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell"; | ||
| 175 | } | 175 | } |
| 176 | CNBInstitutionModel *model = self.institutionArray[indexPath.section]; | 176 | CNBInstitutionModel *model = self.institutionArray[indexPath.section]; |
| 177 | NSArray *circleArray = model.quanziItem; | 177 | NSArray *circleArray = model.quanziItem; |
| 178 | - groupCell.circleModel = circleArray[indexPath.row -1]; | 178 | + if (circleArray.count > 0) { |
| 179 | + groupCell.circleModel = circleArray[indexPath.row -1]; | ||
| 180 | + }else { | ||
| 181 | + CNBCirccleModel *circleModel = [[CNBCirccleModel alloc]init]; | ||
| 182 | + circleModel.quanziName = @"无"; | ||
| 183 | + NSMutableArray *groupArray = [NSMutableArray array]; | ||
| 184 | + NSArray *noneArray = @[@{@"groupId":@"",@"groupName":@"无"}, | ||
| 185 | + ]; | ||
| 186 | + for (NSDictionary *dic in noneArray) { | ||
| 187 | + CNBGroupModel *model = [CNBGroupModel mj_objectWithKeyValues:dic]; | ||
| 188 | + [groupArray addObject:model]; | ||
| 189 | + } | ||
| 190 | + circleModel.groupItem = groupArray; | ||
| 191 | + groupCell.circleModel = circleModel; | ||
| 192 | + } | ||
| 179 | return groupCell; | 193 | return groupCell; |
| 180 | } | 194 | } |
| 181 | } | 195 | } |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPersonalVerificationController.m
| @@ -305,27 +305,33 @@ | @@ -305,27 +305,33 @@ | ||
| 305 | [circleDic setObject:typeModel.type forKey:@"type"]; | 305 | [circleDic setObject:typeModel.type forKey:@"type"]; |
| 306 | [circleDic setObject:typeModel.homePageId forKey:@"quanziId"]; | 306 | [circleDic setObject:typeModel.homePageId forKey:@"quanziId"]; |
| 307 | [circleDic setObject:typeModel.circleName forKey:@"quanziName"]; | 307 | [circleDic setObject:typeModel.circleName forKey:@"quanziName"]; |
| 308 | + NSMutableArray *groupArray = [NSMutableArray array]; | ||
| 309 | + if (typeModel.groupArray.count > 0 && typeModel.groupArray) { | ||
| 310 | + for (CNBPerAuthSelectTypeModel *groupModel in typeModel.groupArray) { | ||
| 311 | + NSMutableDictionary *groupDic = [NSMutableDictionary dictionary]; | ||
| 312 | + [groupDic setObject:groupModel.groupId forKey:@"groupId"]; | ||
| 313 | + [groupDic setObject:groupModel.name forKey:@"groupName"]; | ||
| 314 | + [groupArray addObject:groupDic]; | ||
| 315 | + } | ||
| 316 | + [circleDic setObject:groupArray forKey:@"groupItem"]; | ||
| 317 | + } | ||
| 318 | + | ||
| 319 | + [circleArray addObject:circleDic]; | ||
| 320 | + [instritutionDic addArray:circleArray.copy forKey:@"quanziItem"]; | ||
| 308 | } | 321 | } |
| 309 | - NSMutableArray *groupArray = [NSMutableArray array]; | ||
| 310 | - for (CNBPerAuthSelectTypeModel *groupModel in typeModel.groupArray) { | ||
| 311 | - NSMutableDictionary *groupDic = [NSMutableDictionary dictionary]; | ||
| 312 | - [groupDic setObject:groupModel.groupId forKey:@"groupId"]; | ||
| 313 | - [groupDic setObject:groupModel.name forKey:@"groupName"]; | ||
| 314 | - [groupArray addObject:groupDic]; | ||
| 315 | - } | ||
| 316 | - [circleDic setObject:groupArray forKey:@"groupItem"]; | ||
| 317 | - [circleArray addObject:circleDic]; | ||
| 318 | 322 | ||
| 319 | } | 323 | } |
| 320 | 324 | ||
| 321 | - [instritutionDic addArray:circleArray.copy forKey:@"quanziItem"]; | ||
| 322 | } | 325 | } |
| 323 | } | 326 | } |
| 324 | [instritutionArray addObject:instritutionDic]; | 327 | [instritutionArray addObject:instritutionDic]; |
| 325 | } | 328 | } |
| 326 | [submitDic setObject:instritutionArray forKey:@"Institution"]; | 329 | [submitDic setObject:instritutionArray forKey:@"Institution"]; |
| 327 | [submitDic setObject:CNUserShareModelUid forKey:@"sid"]; | 330 | [submitDic setObject:CNUserShareModelUid forKey:@"sid"]; |
| 331 | +// [submitDic setObject:@" 10511059" forKey:@"sid"]; | ||
| 332 | + | ||
| 328 | NSString *submitStr = [self objectToJson:submitDic]; | 333 | NSString *submitStr = [self objectToJson:submitDic]; |
| 334 | + | ||
| 329 | submitStr = [submitStr stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"]; | 335 | submitStr = [submitStr stringByReplacingOccurrencesOfString:@"\\/" withString:@"/"]; |
| 330 | __weak typeof(self) weakSelf = self; | 336 | __weak typeof(self) weakSelf = self; |
| 331 | [CNBPerAuthViewModel submitPerAuthData:submitStr successBlock:^(BOOL isSuccess) { | 337 | [CNBPerAuthViewModel submitPerAuthData:submitStr successBlock:^(BOOL isSuccess) { |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPerAuthTypeRadioView.m
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | #import "CNEmptyView.h" | 16 | #import "CNEmptyView.h" |
| 17 | #import "CNBIdentifierModel.h" | 17 | #import "CNBIdentifierModel.h" |
| 18 | #import "CNBPerAuthManager.h" | 18 | #import "CNBPerAuthManager.h" |
| 19 | +#import "UIButton+createButton.h" | ||
| 19 | #define CNBSelecctIdentifier @"CNBPerAuthTypeRadioCell" | 20 | #define CNBSelecctIdentifier @"CNBPerAuthTypeRadioCell" |
| 20 | #define CNBottomSureBtnHeight 75 | 21 | #define CNBottomSureBtnHeight 75 |
| 21 | #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window | 22 | #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window |
| @@ -30,7 +31,7 @@ | @@ -30,7 +31,7 @@ | ||
| 30 | @property (nonatomic, copy) NSString *homepageId; | 31 | @property (nonatomic, copy) NSString *homepageId; |
| 31 | @property (nonatomic, assign) NSInteger page; | 32 | @property (nonatomic, assign) NSInteger page; |
| 32 | @property (nonatomic, strong) NSMutableArray *dataSource; | 33 | @property (nonatomic, strong) NSMutableArray *dataSource; |
| 33 | -@property (nonatomic, strong) CNEmptyView *emptyView; | 34 | +@property (nonatomic, strong) CNEmptyView *selectEmptyView; |
| 34 | @property (nonatomic, strong) UIButton *sureBtn; //确定按钮 | 35 | @property (nonatomic, strong) UIButton *sureBtn; //确定按钮 |
| 35 | @property (nonatomic, strong) CNBTypeModel *typeModel; | 36 | @property (nonatomic, strong) CNBTypeModel *typeModel; |
| 36 | @property (nonatomic, strong) NSMutableArray *sureDataArray; //最后确定提交的数组,最多只能添加5个群组 | 37 | @property (nonatomic, strong) NSMutableArray *sureDataArray; //最后确定提交的数组,最多只能添加5个群组 |
| @@ -148,10 +149,10 @@ | @@ -148,10 +149,10 @@ | ||
| 148 | [strongSelf showEmptyView:self.selectType errorType:CNBPerShowErrorTypeNoData]; | 149 | [strongSelf showEmptyView:self.selectType errorType:CNBPerShowErrorTypeNoData]; |
| 149 | }else { | 150 | }else { |
| 150 | strongSelf.tableView.tableFooterView = [UIView new]; | 151 | strongSelf.tableView.tableFooterView = [UIView new]; |
| 151 | - [strongSelf.emptyView removeFromSuperview]; | 152 | + [strongSelf.selectEmptyView removeFromSuperview]; |
| 152 | } | 153 | } |
| 153 | if (strongSelf.selectType == CNBPerAuthRadioTypeCircle ) { | 154 | if (strongSelf.selectType == CNBPerAuthRadioTypeCircle ) { |
| 154 | - if (!strongSelf.isRefresh) { | 155 | + if (!strongSelf.isRefresh && strongSelf.dataSource.count > 0) { |
| 155 | CNBPerAuthSelectTypeModel *selectModel = [[CNBPerAuthSelectTypeModel alloc]init]; | 156 | CNBPerAuthSelectTypeModel *selectModel = [[CNBPerAuthSelectTypeModel alloc]init]; |
| 156 | selectModel.name = @"无"; | 157 | selectModel.name = @"无"; |
| 157 | selectModel.typeId = @""; | 158 | selectModel.typeId = @""; |
| @@ -177,7 +178,7 @@ | @@ -177,7 +178,7 @@ | ||
| 177 | [weakSelf showEmptyView:self.selectType errorType:CNBPerShowErrorTypeFail]; | 178 | [weakSelf showEmptyView:self.selectType errorType:CNBPerShowErrorTypeFail]; |
| 178 | } | 179 | } |
| 179 | }else { | 180 | }else { |
| 180 | - [weakSelf.emptyView removeFromSuperview]; | 181 | + [weakSelf.selectEmptyView removeFromSuperview]; |
| 181 | [QMUITips showWithText:error.localizedDescription inView:CNBAppKeyWindow hideAfterDelay:1.5f]; | 182 | [QMUITips showWithText:error.localizedDescription inView:CNBAppKeyWindow hideAfterDelay:1.5f]; |
| 182 | } | 183 | } |
| 183 | }]; | 184 | }]; |
| @@ -220,18 +221,20 @@ | @@ -220,18 +221,20 @@ | ||
| 220 | } | 221 | } |
| 221 | 222 | ||
| 222 | BOOL isHiden = errorType == CNBPerShowErrorTypeNoData; | 223 | BOOL isHiden = errorType == CNBPerShowErrorTypeNoData; |
| 223 | - [self.emptyView showImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:imageName bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] title:titleName detailTitle:@"" retryBtnTitle:retryName]; | ||
| 224 | - self.emptyView.retryBtn.hidden = isHiden; | ||
| 225 | - self.emptyView.retryBtn.backgroundColor = kWhiteColor; | ||
| 226 | - self.emptyView.retryBtn.layer.masksToBounds = YES; | ||
| 227 | - self.emptyView.retryBtn.layer.cornerRadius = 14; | ||
| 228 | - self.emptyView.retryBtn.layer.borderWidth = 1; | ||
| 229 | - self.emptyView.retryBtn.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor; | ||
| 230 | - [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateNormal]; | ||
| 231 | - [self.emptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateHighlighted]; | ||
| 232 | - errorType == CNBPerShowErrorTypeNoData ?self.tableView.tableFooterView = self.emptyView :[self addSubview:self.emptyView]; | 224 | + UIImage *image = [CNLivePerAuthGetImage cnLivePerAuth_getImageName:imageName bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] ; |
| 225 | + self.selectEmptyView.imageSize = image.size; | ||
| 226 | + [self.selectEmptyView showImage:image title:titleName detailTitle:@"" retryBtnTitle:retryName]; | ||
| 227 | + self.selectEmptyView.retryBtn.hidden = isHiden; | ||
| 228 | + self.selectEmptyView.retryBtn.backgroundColor = kWhiteColor; | ||
| 229 | + self.selectEmptyView.retryBtn.layer.masksToBounds = YES; | ||
| 230 | + self.selectEmptyView.retryBtn.layer.cornerRadius = 14; | ||
| 231 | + self.selectEmptyView.retryBtn.layer.borderWidth = 1; | ||
| 232 | + self.selectEmptyView.retryBtn.layer.borderColor = CNLiveColorWithHexString(@"48A7F9").CGColor; | ||
| 233 | + [self.selectEmptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateNormal]; | ||
| 234 | + [self.selectEmptyView.retryBtn setTitleColor:CNLiveColorWithHexString(@"48A7F9") forState:UIControlStateHighlighted]; | ||
| 235 | + errorType == CNBPerShowErrorTypeNoData ?self.tableView.tableFooterView = self.selectEmptyView :[self addSubview:self.selectEmptyView]; | ||
| 233 | if (!isHiden) { | 236 | if (!isHiden) { |
| 234 | - [self.emptyView.retryBtn addTarget:self action:@selector(retryloadData) forControlEvents:UIControlEventTouchUpInside]; | 237 | + [self.selectEmptyView.retryBtn addTarget:self action:@selector(retryloadData) forControlEvents:UIControlEventTouchUpInside]; |
| 235 | } | 238 | } |
| 236 | 239 | ||
| 237 | } | 240 | } |
| @@ -414,7 +417,7 @@ | @@ -414,7 +417,7 @@ | ||
| 414 | if (!_closeBtn) { | 417 | if (!_closeBtn) { |
| 415 | _closeBtn = [[UIButton alloc]init]; | 418 | _closeBtn = [[UIButton alloc]init]; |
| 416 | [_closeBtn setImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:@"perAuth_cancel" bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] forState:UIControlStateNormal]; | 419 | [_closeBtn setImage:[CNLivePerAuthGetImage cnLivePerAuth_getImageName:@"perAuth_cancel" bundle:@"CNLiveBPersonalVerificationModule.bundle/CNLiveBPersonalVerificationModule" targetClass:[self class]] forState:UIControlStateNormal]; |
| 417 | -// _closeBtn.touchAreaInsets = UIEdgeInsetsMake(15, 15, 15, 15); | 420 | + _closeBtn.touchAreaInsets = UIEdgeInsetsMake(15, 15, 15, 15); |
| 418 | [_closeBtn addTarget:self action:@selector(closeBtnAction) forControlEvents:UIControlEventTouchUpInside]; | 421 | [_closeBtn addTarget:self action:@selector(closeBtnAction) forControlEvents:UIControlEventTouchUpInside]; |
| 419 | } | 422 | } |
| 420 | return _closeBtn; | 423 | return _closeBtn; |
| @@ -466,12 +469,12 @@ | @@ -466,12 +469,12 @@ | ||
| 466 | } | 469 | } |
| 467 | return _sureDataArray; | 470 | return _sureDataArray; |
| 468 | } | 471 | } |
| 469 | -- (CNEmptyView *)emptyView { | ||
| 470 | - if (!_emptyView) { | ||
| 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 | +- (CNEmptyView *)selectEmptyView { |
| 473 | + if (!_selectEmptyView) { | ||
| 474 | + _selectEmptyView = [[CNEmptyView alloc]initWithFrame:CGRectMake(0, KScreenHeight/4 +kNavigationBarHeight + 40, KScreenWidth, KScreenHeight*3/4 - kNavigationBarHeight - kVerticalBottomSafeHeight - 40) type:0]; | ||
| 475 | + _selectEmptyView.backgroundColor = [UIColor whiteColor]; | ||
| 473 | } | 476 | } |
| 474 | - return _emptyView; | 477 | + return _selectEmptyView; |
| 475 | } | 478 | } |
| 476 | @end | 479 | @end |
| 477 | 480 |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPersonalInfoCell.m
| @@ -15,6 +15,7 @@ | @@ -15,6 +15,7 @@ | ||
| 15 | #import <SDWebImage/SDWebImage.h> | 15 | #import <SDWebImage/SDWebImage.h> |
| 16 | #import "CNBImageZoom.h" | 16 | #import "CNBImageZoom.h" |
| 17 | #import "MJExtension.h" | 17 | #import "MJExtension.h" |
| 18 | +#import "NSString+CNLiveExtension.h" | ||
| 18 | #pragma mark - 身份证cell | 19 | #pragma mark - 身份证cell |
| 19 | @interface CNBPersonalInfoCell () | 20 | @interface CNBPersonalInfoCell () |
| 20 | @property (nonatomic, strong) UILabel *nameLabel; //名字名称 | 21 | @property (nonatomic, strong) UILabel *nameLabel; //名字名称 |
| @@ -257,7 +258,7 @@ | @@ -257,7 +258,7 @@ | ||
| 257 | } | 258 | } |
| 258 | - (void)setCircleModel:(CNBCirccleModel *)circleModel { | 259 | - (void)setCircleModel:(CNBCirccleModel *)circleModel { |
| 259 | _circleModel = circleModel; | 260 | _circleModel = circleModel; |
| 260 | - _circleDescLabel.text = circleModel.quanziName; | 261 | + _circleDescLabel.text = CNLiveStringIsEmpty(circleModel.quanziName)? @"" :circleModel.quanziName; |
| 261 | NSMutableArray *groupArray = [NSMutableArray array]; | 262 | NSMutableArray *groupArray = [NSMutableArray array]; |
| 262 | if (circleModel.groupItem && circleModel.groupItem.count > 0) { | 263 | if (circleModel.groupItem && circleModel.groupItem.count > 0) { |
| 263 | [self setTagView:circleModel.groupItem]; | 264 | [self setTagView:circleModel.groupItem]; |
| @@ -311,23 +312,7 @@ | @@ -311,23 +312,7 @@ | ||
| 311 | [_groupDesView mas_updateConstraints:^(MASConstraintMaker *make) { | 312 | [_groupDesView mas_updateConstraints:^(MASConstraintMaker *make) { |
| 312 | make.height.mas_equalTo(tagsTotalHeigh); | 313 | make.height.mas_equalTo(tagsTotalHeigh); |
| 313 | }]; | 314 | }]; |
| 314 | -// }else { | ||
| 315 | -// UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(tagsTotalWidth, tagsTotalHeigh, 0, 0)]; | ||
| 316 | -// label.font = [UIFont systemFontOfSize:12]; | ||
| 317 | -// label.textAlignment = NSTextAlignmentCenter; | ||
| 318 | -// label.textColor = CNLiveColorWithHexString(@"B9B9B9"); | ||
| 319 | -// label.text = @"无"; | ||
| 320 | -// [label sizeToFit]; | ||
| 321 | -// label.frame = CGRectMake(tagsTotalWidth, tagsTotalHeigh, CGRectGetWidth(label.frame) + 7.5, CGRectGetHeight(label.frame)+7.5); | ||
| 322 | -// tagHeight = CGRectGetHeight(label.frame); | ||
| 323 | -// [self.groupDesView addSubview:label]; | ||
| 324 | -// tagsTotalHeigh = tagsTotalHeigh +tagHeight; | ||
| 325 | -// [_groupDesView mas_updateConstraints:^(MASConstraintMaker *make) { | ||
| 326 | -// make.height.mas_equalTo(tagsTotalHeigh); | ||
| 327 | -// }]; | ||
| 328 | -// } | ||
| 329 | -// | ||
| 330 | - | 315 | + |
| 331 | } | 316 | } |
| 332 | #pragma mark -Lazy | 317 | #pragma mark -Lazy |
| 333 | - (UILabel *)circleLabel { | 318 | - (UILabel *)circleLabel { |
| @@ -348,7 +333,7 @@ | @@ -348,7 +333,7 @@ | ||
| 348 | _circleDescLabel.font = [UIFont systemFontOfSize:12.5]; | 333 | _circleDescLabel.font = [UIFont systemFontOfSize:12.5]; |
| 349 | _circleDescLabel.numberOfLines = 1; | 334 | _circleDescLabel.numberOfLines = 1; |
| 350 | _circleDescLabel.textAlignment = NSTextAlignmentLeft; | 335 | _circleDescLabel.textAlignment = NSTextAlignmentLeft; |
| 351 | - _circleDescLabel.text = @"李德文老师的圈子"; | 336 | + _circleDescLabel.text = @"无"; |
| 352 | } | 337 | } |
| 353 | return _circleDescLabel; | 338 | return _circleDescLabel; |
| 354 | } | 339 | } |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/CNBPersonalVerificationCell.m
| @@ -225,14 +225,14 @@ static const NSInteger CNBGroupTag = 202; | @@ -225,14 +225,14 @@ static const NSInteger CNBGroupTag = 202; | ||
| 225 | self.deleteBtn.hidden = YES; | 225 | self.deleteBtn.hidden = YES; |
| 226 | } | 226 | } |
| 227 | } | 227 | } |
| 228 | - if (CNLiveStringIsEmpty(typeModel.circleName)) { | 228 | + if (CNLiveStringIsEmpty(typeModel.homePageId)) { |
| 229 | self.circleView.showLabel.text = @"无"; | 229 | self.circleView.showLabel.text = @"无"; |
| 230 | self.circleView.showLabel.textColor = CNLiveColorWithHexString(@"B9B9B9"); | 230 | self.circleView.showLabel.textColor = CNLiveColorWithHexString(@"B9B9B9"); |
| 231 | }else { | 231 | }else { |
| 232 | self.circleView.showLabel.text = typeModel.circleName; | 232 | self.circleView.showLabel.text = typeModel.circleName; |
| 233 | self.circleView.showLabel.textColor = CNLiveColorWithHexString(@"333333"); | 233 | self.circleView.showLabel.textColor = CNLiveColorWithHexString(@"333333"); |
| 234 | } | 234 | } |
| 235 | - if (CNLiveStringIsEmpty(typeModel.groupName)) { | 235 | + if (CNLiveStringIsEmpty(typeModel.groupName) || [typeModel.groupName isEqualToString:@"无"]) { |
| 236 | self.groupView.showLabel.text = @"无"; | 236 | self.groupView.showLabel.text = @"无"; |
| 237 | self.groupView.showLabel.textColor = CNLiveColorWithHexString(@"B9B9B9"); | 237 | self.groupView.showLabel.textColor = CNLiveColorWithHexString(@"B9B9B9"); |
| 238 | }else { | 238 | }else { |
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthManager.m
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthViewModel.m
| @@ -29,6 +29,7 @@ | @@ -29,6 +29,7 @@ | ||
| 29 | [CNLiveNetworking setupShowDataResult:NO]; | 29 | [CNLiveNetworking setupShowDataResult:NO]; |
| 30 | [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | 30 | [CNLiveNetworking setAllowRequestDefaultArgument:YES]; |
| 31 | NSString *url = cn_API_Classify(@"/contentApi/getAllSp"); | 31 | NSString *url = cn_API_Classify(@"/contentApi/getAllSp"); |
| 32 | + | ||
| 32 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:url Param:param CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | 33 | [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:url Param:param CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { |
| 33 | if (responseObject && [responseObject isKindOfClass:[NSDictionary class]]) { | 34 | if (responseObject && [responseObject isKindOfClass:[NSDictionary class]]) { |
| 34 | NSString *errorCode = [NSString stringWithFormat:@"%@",[responseObject objectForKey:@"errorCode"]]; | 35 | NSString *errorCode = [NSString stringWithFormat:@"%@",[responseObject objectForKey:@"errorCode"]]; |
| @@ -85,7 +86,7 @@ | @@ -85,7 +86,7 @@ | ||
| 85 | #pragma mark -请求认证成功 | 86 | #pragma mark -请求认证成功 |
| 86 | + (void)getPerAuthSuccessList:(void (^)(NSMutableArray *dataArray))successBlock failureBlock:(void (^)(NSError * error))failureBlock { | 87 | + (void)getPerAuthSuccessList:(void (^)(NSMutableArray *dataArray))successBlock failureBlock:(void (^)(NSError * error))failureBlock { |
| 87 | NSDictionary *param = @{ | 88 | NSDictionary *param = @{ |
| 88 | -// @"sid":@"10505015" | 89 | +// @"sid":@"10504908" |
| 89 | @"sid":CNUserShareModelUid | 90 | @"sid":CNUserShareModelUid |
| 90 | }; | 91 | }; |
| 91 | [QMUITips showLoadingInView:CNBAppKeyWindow]; | 92 | [QMUITips showLoadingInView:CNBAppKeyWindow]; |
CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/ApplyForShootController.m
| @@ -25,10 +25,10 @@ | @@ -25,10 +25,10 @@ | ||
| 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 | -#import "CNBPersonalVerificationController.h" | ||
| 29 | #import <CNLiveImagePickerController/TZImagePickerController.h> | 28 | #import <CNLiveImagePickerController/TZImagePickerController.h> |
| 30 | #import <CNLiveImagePickerController/TZImageManager.h> | 29 | #import <CNLiveImagePickerController/TZImageManager.h> |
| 31 | #import <CNLiveCommonCategory/CNLiveCommonCategory.h> | 30 | #import <CNLiveCommonCategory/CNLiveCommonCategory.h> |
| 31 | +#import "CNLiveBPersonAuthentProtocol.h" | ||
| 32 | @interface ApplyForShootController ()<UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource,UINavigationControllerDelegate, UIImagePickerControllerDelegate> | 32 | @interface ApplyForShootController ()<UIAlertViewDelegate,UITableViewDelegate,UITableViewDataSource,UINavigationControllerDelegate, UIImagePickerControllerDelegate> |
| 33 | 33 | ||
| 34 | @property (nonatomic, strong) UITableView *tableView; | 34 | @property (nonatomic, strong) UITableView *tableView; |
| @@ -551,11 +551,11 @@ | @@ -551,11 +551,11 @@ | ||
| 551 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { | 551 | if ([[NSString stringWithFormat:@"%@",responseObject[@"errorCode"]] isEqualToString:@"0"]) { |
| 552 | 552 | ||
| 553 | //成功 | 553 | //成功 |
| 554 | - CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | ||
| 555 | - [self.navigationController pushViewController:vc animated:NO]; | ||
| 556 | -// id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 557 | -// CNBPersonalVerificationController *vc = (CNBPersonalVerificationController *)[service pushToAddPerAuthInstitutionsController:@{}]; | ||
| 558 | -// [self.navigationController pushViewController:vc animated:YES]; | 554 | +// CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; |
| 555 | +// [self.navigationController pushViewController:vc animated:NO]; | ||
| 556 | + id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 557 | + UIViewController *vc = [service pushToAddPerAuthInstitutionsController:@{}]; | ||
| 558 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 559 | 559 | ||
| 560 | } else {//接口失败 | 560 | } else {//接口失败 |
| 561 | 561 |
Example/CNLiveBPersonalVerificationModule/CNLIVEViewController.m
| @@ -45,9 +45,9 @@ | @@ -45,9 +45,9 @@ | ||
| 45 | - (void)buttonAction { | 45 | - (void)buttonAction { |
| 46 | // ApplyForShootController *vc = [[ApplyForShootController alloc] init]; | 46 | // ApplyForShootController *vc = [[ApplyForShootController alloc] init]; |
| 47 | 47 | ||
| 48 | - id <CNLiveIDCardAuthenProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveIDCardAuthenProtocol)]; | ||
| 49 | - ApplyForShootController *vc = (ApplyForShootController *)[service pushToCNLiveIDCardAuthController]; | ||
| 50 | -// CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | 48 | +// id <CNLiveIDCardAuthenProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveIDCardAuthenProtocol)]; |
| 49 | +// ApplyForShootController *vc = (ApplyForShootController *)[service pushToCNLiveIDCardAuthController]; | ||
| 50 | + CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init]; | ||
| 51 | [self.navigationController pushViewController:vc animated:NO]; | 51 | [self.navigationController pushViewController:vc animated:NO]; |
| 52 | } | 52 | } |
| 53 | - (void)successBtnAction { | 53 | - (void)successBtnAction { |
Example/CNLiveBPersonalVerificationModule/main.m
| @@ -12,7 +12,7 @@ | @@ -12,7 +12,7 @@ | ||
| 12 | int main(int argc, char * argv[]) | 12 | int main(int argc, char * argv[]) |
| 13 | { | 13 | { |
| 14 | @autoreleasepool { | 14 | @autoreleasepool { |
| 15 | - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBLive environmentType:CNLiveDebugAppStore]; | 15 | + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBLive environmentType:CNLiveProductionAppStore]; |
| 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); | 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([CNLIVEAppDelegate class])); |
| 17 | } | 17 | } |
| 18 | } | 18 | } |