Commit d2f3e284f8fd91b73bf2d064ae33cd96efc643c3
1 parent
789758c0
提交更改
Showing
2 changed files
with
93 additions
and
2 deletions
CNLiveServiceCenterModule.podspec
| @@ -50,6 +50,7 @@ Pod::Spec.new do |s| | @@ -50,6 +50,7 @@ Pod::Spec.new do |s| | ||
| 50 | #CNLive组件 | 50 | #CNLive组件 |
| 51 | s.dependency 'CNLiveBeeHive' #核心路由架构 | 51 | s.dependency 'CNLiveBeeHive' #核心路由架构 |
| 52 | s.dependency 'CNLiveModuleServiceProtocols' | 52 | s.dependency 'CNLiveModuleServiceProtocols' |
| 53 | + s.dependency 'CNLiveBServices' | ||
| 53 | 54 | ||
| 54 | #分享工具库 | 55 | #分享工具库 |
| 55 | s.dependency 'CNLiveShareToolKit' | 56 | s.dependency 'CNLiveShareToolKit' |
CNLiveServiceCenterModule/Classes/CNLiveServiceCenterModule/Controller/CNLiveBServiceCenterController.m
| @@ -21,10 +21,11 @@ | @@ -21,10 +21,11 @@ | ||
| 21 | #import "CNLiveBOrganizationValidationProtocol.h" | 21 | #import "CNLiveBOrganizationValidationProtocol.h" |
| 22 | #import <YYKit/YYKit.h> | 22 | #import <YYKit/YYKit.h> |
| 23 | #import <QMUIKit/QMUIKit.h> | 23 | #import <QMUIKit/QMUIKit.h> |
| 24 | +#import <CNLiveBServices/CNLiveBPersonAuthentProtocol.h> | ||
| 24 | 25 | ||
| 25 | #define CNLiveBGetServiceStatusUrl cn_API_OpenApi2(@"/user/readWJJBStatusById") | 26 | #define CNLiveBGetServiceStatusUrl cn_API_OpenApi2(@"/user/readWJJBStatusById") |
| 26 | #define CNLiveBOrganizationValidattionStatusUrl cn_API_OpenApi2(@"/auser/getAccount.action") | 27 | #define CNLiveBOrganizationValidattionStatusUrl cn_API_OpenApi2(@"/auser/getAccount.action") |
| 27 | - | 28 | +#define CNLiveBOrganizationPersonStatusUrl cn_API_Host(@"/Daren/buser/getBUserInfo.action") |
| 28 | 29 | ||
| 29 | @interface CNLiveBServiceCenterController ()<UITableViewDataSource,UITableViewDelegate> | 30 | @interface CNLiveBServiceCenterController ()<UITableViewDataSource,UITableViewDelegate> |
| 30 | 31 | ||
| @@ -233,7 +234,9 @@ | @@ -233,7 +234,9 @@ | ||
| 233 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { | 234 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { |
| 234 | 235 | ||
| 235 | if (indexPath.section == 0) { | 236 | if (indexPath.section == 0) { |
| 236 | - if (indexPath.row == 1) { | 237 | + if (indexPath.row == 0){ |
| 238 | + [self checkPersonCertification]; | ||
| 239 | + }else if (indexPath.row == 1) { | ||
| 237 | 240 | ||
| 238 | [self checkAccreditedInstitution]; | 241 | [self checkAccreditedInstitution]; |
| 239 | 242 | ||
| @@ -314,6 +317,93 @@ | @@ -314,6 +317,93 @@ | ||
| 314 | } | 317 | } |
| 315 | 318 | ||
| 316 | 319 | ||
| 320 | +- (void)checkPersonCertification { | ||
| 321 | + | ||
| 322 | + //URL: https://apiwjjtest.cnlive.com/Daren/buser/getBUserInfo.action? | ||
| 323 | + NSString *strUrl = CNLiveBOrganizationPersonStatusUrl; | ||
| 324 | + NSDictionary *dict = @{ | ||
| 325 | + @"sid": [NSString stringWithFormat:@"%@",CNUserShareModel.uid], | ||
| 326 | + }; | ||
| 327 | + [QMUITips showLoadingInView:self.view]; | ||
| 328 | + [CNLiveNetworking setAllowRequestDefaultArgument:YES]; | ||
| 329 | + [CNLiveNetworking setupShowDataResult:NO]; | ||
| 330 | + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:strUrl Param:dict CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { | ||
| 331 | + [QMUITips hideAllTipsInView:self.view]; | ||
| 332 | + | ||
| 333 | + NSLog(@"点播详情数据 = %@",responseObject); | ||
| 334 | + | ||
| 335 | + NSString *resultCode = [NSString stringWithFormat:@"%@", responseObject[@"errorCode"]]; | ||
| 336 | + NSError *err = nil; | ||
| 337 | + id data = nil; | ||
| 338 | + if([resultCode isEqualToString:@"0"]) { | ||
| 339 | + data = responseObject[@"data"]; | ||
| 340 | + } else { | ||
| 341 | + @try { | ||
| 342 | + err = [[NSError alloc] initWithDomain:responseObject[@"errorMessage"] code:[resultCode integerValue] userInfo:nil]; | ||
| 343 | + } @catch (NSException *exception) { | ||
| 344 | + err = [[NSError alloc] initWithDomain:@"接口异常" code:500 userInfo:nil]; | ||
| 345 | + } | ||
| 346 | + } | ||
| 347 | + | ||
| 348 | + if (!error) { | ||
| 349 | + BOOL isEnter = NO; | ||
| 350 | + NSDictionary *dicContent = (NSDictionary *)data; | ||
| 351 | + if (dicContent) { | ||
| 352 | + if ([dicContent containsObjectForKey:@"checkStatus"]) { | ||
| 353 | + | ||
| 354 | + NSString *ischeckStatusStr = [NSString stringWithFormat:@"%@",[dicContent objectForKey:@"checkStatus"]]; | ||
| 355 | + if ([ischeckStatusStr isEqualToString:@"0"]) {//无认证 | ||
| 356 | + /// 填表页 | ||
| 357 | + id<CNLiveBPersonAuthentProtocol> personProtocol = [[BeeHive shareInstance] createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 358 | + UIViewController *vc = [personProtocol pushToPersonalCertificationStatusController:dicContent]; | ||
| 359 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 360 | + | ||
| 361 | + isEnter = YES; | ||
| 362 | + }else if ([ischeckStatusStr isEqualToString:@"1"]) {//已认证 | ||
| 363 | + /// 详情页 | ||
| 364 | + /// 填表页 | ||
| 365 | + id<CNLiveBPersonAuthentProtocol> personProtocol = [[BeeHive shareInstance] createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 366 | + UIViewController *vc = [personProtocol pushToPersonalAuthenticationSuccessController:dicContent]; | ||
| 367 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 368 | + | ||
| 369 | + | ||
| 370 | + isEnter = YES; | ||
| 371 | + }else if ([ischeckStatusStr isEqualToString:@"2"]) {//审核中 | ||
| 372 | +#pragma mark - TODO: 测试先用 | ||
| 373 | + id<CNLiveBPersonAuthentProtocol> personProtocol = [[BeeHive shareInstance] createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 374 | + UIViewController *vc = [personProtocol pushToPersonalCertificationStatusController:dicContent]; | ||
| 375 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 376 | + | ||
| 377 | + | ||
| 378 | + | ||
| 379 | + isEnter = YES; | ||
| 380 | + }else if ([ischeckStatusStr isEqualToString:@"3"]) {//审核失败 | ||
| 381 | +#pragma mark - TODO: 测试先用 | ||
| 382 | + id<CNLiveBPersonAuthentProtocol> personProtocol = [[BeeHive shareInstance] createService:@protocol(CNLiveBPersonAuthentProtocol)]; | ||
| 383 | + UIViewController *vc = [personProtocol pushToPersonalCertificationStatusController:dicContent]; | ||
| 384 | + [self.navigationController pushViewController:vc animated:YES]; | ||
| 385 | + | ||
| 386 | + isEnter = YES; | ||
| 387 | + } | ||
| 388 | + | ||
| 389 | + } | ||
| 390 | + } | ||
| 391 | + | ||
| 392 | + if (!isEnter) { | ||
| 393 | +#pragma mark - TODO:弹框 | ||
| 394 | + ///弹框 | ||
| 395 | + } | ||
| 396 | + | ||
| 397 | + }else { | ||
| 398 | + | ||
| 399 | + } | ||
| 400 | + | ||
| 401 | + }]; | ||
| 402 | + | ||
| 403 | + | ||
| 404 | +} | ||
| 405 | + | ||
| 406 | + | ||
| 317 | - (void)checkAccreditedInstitution { | 407 | - (void)checkAccreditedInstitution { |
| 318 | 408 | ||
| 319 | 409 |