Commit fe796bb90514231cd95a9c7cf06937508e6d6f71

Authored by 梁星国
1 parent bd6c5c18

提交0.0.6

CNLiveOrganizationValidationModule.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 = 'CNLiveOrganizationValidationModule' 10 s.name = 'CNLiveOrganizationValidationModule'
11 - s.version = '0.0.5' 11 + s.version = '0.0.6'
12 s.summary = '机构认证模块' 12 s.summary = '机构认证模块'
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.
CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_detailCer@2x.png 0 → 100644

27.6 KB

CNLiveOrganizationValidationModule/Assets/CNLiveOrganizationValidationModule.bundle/organization_detailCer@3x.png 0 → 100644

61.6 KB

CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBAgreementContentController.m
@@ -6,8 +6,26 @@ @@ -6,8 +6,26 @@
6 // 6 //
7 7
8 #import "CNLiveBAgreementContentController.h" 8 #import "CNLiveBAgreementContentController.h"
  9 +#import <WebKit/WebKit.h>
  10 +#import <CNLiveEnvironment/CNLiveEnvironment.h>
  11 +#import <CNLiveRequestBastKit/CNLiveNetworkRequest.h>
  12 +#import <CNLiveRequestBastKit/CNLiveNetworking.h>
  13 +#import <CNLiveUserManagement/CNUserInfoManager.h>
  14 +#import <CNLiveBeeHive/CNLiveBeeHive.h>
  15 +#import <MJExtension/MJExtension.h>
  16 +#import <QMUIKit/QMUIKit.h>
  17 +#import <YYKit/YYKit.h>
  18 +#import <objc/runtime.h>
  19 +#import <CNLiveBaseKit/CNLiveBaseKit.h>
9 20
10 -@interface CNLiveBAgreementContentController () 21 +//https://wjj.ys1.cnliveimg.com/term/cnBNraqxy.html
  22 +
  23 +#define CNLiveBOrganizationContentAgreementUrl cn_API_Refund(@"/term/cnBNraqxy.html")
  24 +@interface CNLiveBAgreementContentController ()<WKNavigationDelegate,WKUIDelegate,UIScrollViewDelegate>
  25 +
  26 +@property (strong, nonatomic) WKWebView *wkwebView;
  27 +
  28 +@property (strong, nonatomic) NSString *url;
11 29
12 @end 30 @end
13 31
@@ -17,16 +35,26 @@ @@ -17,16 +35,26 @@
17 [super viewDidLoad]; 35 [super viewDidLoad];
18 self.title = @"机构认证"; 36 self.title = @"机构认证";
19 [self.view setBackgroundColor:[UIColor whiteColor]]; 37 [self.view setBackgroundColor:[UIColor whiteColor]];
  38 + [self initWKWebView];
  39 +
  40 +
20 } 41 }
21 42
22 -/*  
23 -#pragma mark - Navigation  
24 -  
25 -// In a storyboard-based application, you will often want to do a little preparation before navigation  
26 -- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {  
27 - // Get the new view controller using [segue destinationViewController].  
28 - // Pass the selected object to the new view controller. 43 +-(void)initWKWebView
  44 +{
  45 + self.view.backgroundColor = [UIColor whiteColor];
  46 + self.url = CNLiveBOrganizationContentAgreementUrl;
  47 + WKWebView *webView = [[WKWebView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, KScreenHeight)];
  48 + self.view = webView;
  49 + NSURL *url = [NSURL URLWithString:self.url];
  50 + NSURLRequest *request = [NSURLRequest requestWithURL:url];
  51 + [webView loadRequest:request];
  52 +
  53 +
29 } 54 }
30 -*/ 55 +
  56 +
  57 +
  58 +
31 59
32 @end 60 @end
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOraganizationDetailController.m
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 #import <objc/runtime.h> 22 #import <objc/runtime.h>
23 #import <YBImageBrowser/YBImageBrowser.h> 23 #import <YBImageBrowser/YBImageBrowser.h>
24 #import <YBImageBrowser/YBIBImageData.h> 24 #import <YBImageBrowser/YBIBImageData.h>
  25 +#import "UIImage+OrganizationValidation.h"
25 26
26 27
27 //体育中国-详情 28 //体育中国-详情
@@ -38,6 +39,9 @@ @@ -38,6 +39,9 @@
38 /** 列表 */ 39 /** 列表 */
39 @property (nonatomic , strong) UITableView *tableView; 40 @property (nonatomic , strong) UITableView *tableView;
40 41
  42 +@property (nonatomic , strong) NSString *kindStr;
  43 +
  44 +@property (nonatomic , strong) UIImageView *showImageV;
41 45
42 46
43 @end 47 @end
@@ -52,6 +56,7 @@ @@ -52,6 +56,7 @@
52 self = [super init]; 56 self = [super init];
53 if (self) { 57 if (self) {
54 self.detailModel = [[CNLiveOrganizationDetailModel alloc]init]; 58 self.detailModel = [[CNLiveOrganizationDetailModel alloc]init];
  59 + self.kindStr = @"";
55 } 60 }
56 return self; 61 return self;
57 } 62 }
@@ -87,13 +92,24 @@ @@ -87,13 +92,24 @@
87 self.title = @"认证机构"; 92 self.title = @"认证机构";
88 [self.view setBackgroundColor:[UIColor whiteColor]]; 93 [self.view setBackgroundColor:[UIColor whiteColor]];
89 94
  95 +
90 [self.view addSubview:self.tableView]; 96 [self.view addSubview:self.tableView];
  97 + [self.tableView addSubview:self.showImageV];
91 self.tableView.tableHeaderView = self.headerView; 98 self.tableView.tableHeaderView = self.headerView;
92 99
93 if (!self.detailModel.account) { 100 if (!self.detailModel.account) {
94 [self loadData]; 101 [self loadData];
95 } 102 }
96 103
  104 + [self.detailModel.comTypList enumerateObjectsUsingBlock:^(CNLiveOrganizationTipModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  105 + NSString *str = [NSString stringWithFormat:@"%@",obj.ID];
  106 + if (self.detailModel.account) {
  107 + if ([str isEqualToString:self.detailModel.account.com_type_id]) {
  108 + self.kindStr = [NSString stringWithFormat:@"%@",obj.name];
  109 + }
  110 + }
  111 + }];
  112 +
97 } 113 }
98 114
99 #pragma mark - 115 #pragma mark -
@@ -135,7 +151,7 @@ @@ -135,7 +151,7 @@
135 151
136 }else { 152 }else {
137 CNLiveBOrganizationDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationDetailCell forIndexPath:indexPath]; 153 CNLiveBOrganizationDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBOrganizationDetailCell forIndexPath:indexPath];
138 - [cell editUIWithIndexPath:indexPath detailModel:self.detailModel]; 154 + [cell editUIWithIndexPath:indexPath detailModel:self.detailModel kindStr:self.kindStr];
139 return cell; 155 return cell;
140 } 156 }
141 157
@@ -419,8 +435,7 @@ @@ -419,8 +435,7 @@
419 //URL: https://api.cnlive.com/open/api2/auser/getAccount.action? 435 //URL: https://api.cnlive.com/open/api2/auser/getAccount.action?
420 NSString *strUrl = CNLiveBOrganizationValidattionStatusUrl; 436 NSString *strUrl = CNLiveBOrganizationValidattionStatusUrl;
421 NSDictionary *dict = @{ 437 NSDictionary *dict = @{
422 - @"sid": [NSString stringWithFormat:@"%@",CNUserShareModel.uid],  
423 - @"sign":@"" 438 + @"sid": [NSString stringWithFormat:@"%@",CNUserShareModel.uid]
424 }; 439 };
425 [QMUITips showLoadingInView:self.view]; 440 [QMUITips showLoadingInView:self.view];
426 [CNLiveNetworking setAllowRequestDefaultArgument:YES]; 441 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
@@ -446,10 +461,19 @@ @@ -446,10 +461,19 @@
446 if (!err) { 461 if (!err) {
447 CNLiveOrganizationDetailModel *detailModel = [CNLiveOrganizationDetailModel mj_objectWithKeyValues:data]; 462 CNLiveOrganizationDetailModel *detailModel = [CNLiveOrganizationDetailModel mj_objectWithKeyValues:data];
448 self.detailModel = detailModel; 463 self.detailModel = detailModel;
  464 + [self.detailModel.comTypList enumerateObjectsUsingBlock:^(CNLiveOrganizationTipModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
  465 + NSString *str = [NSString stringWithFormat:@"%@",obj.ID];
  466 + if (self.detailModel.account) {
  467 + if ([str isEqualToString:self.detailModel.account.com_type_id]) {
  468 + self.kindStr = [NSString stringWithFormat:@"%@",obj.name];
  469 + }
  470 + }
  471 + }];
449 [self.tableView reloadData]; 472 [self.tableView reloadData];
450 473
  474 + }else {
  475 + [QMUITips showError:err.domain inView:[UIApplication sharedApplication].keyWindow hideAfterDelay:0.5];//@"上传失败"
451 } 476 }
452 -#pragma mark - TODO: 报错信息  
453 477
454 }]; 478 }];
455 479
@@ -483,6 +507,15 @@ @@ -483,6 +507,15 @@
483 return _headerView;; 507 return _headerView;;
484 } 508 }
485 509
  510 +- (UIImageView * )showImageV {
  511 + if (!_showImageV) {
  512 + _showImageV = [[UIImageView alloc] init];
  513 + _showImageV.image = [UIImage imageNamedFromOrganization:@"organization_detailCer"];
  514 + _showImageV.frame = CGRectMake(kScreenWidth - 81 -10, 16, 81, 81);
  515 + }
  516 + return _showImageV;
  517 +}
  518 +
486 519
487 // 520 //
488 // 521 //
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/Controller/CNLiveBOrganizationValidattionController.m
@@ -161,7 +161,6 @@ @@ -161,7 +161,6 @@
161 }; 161 };
162 self.footerView.clickAgreementButtonBlock = ^(CNLiveBOrganizationTVFooteriew * _Nonnull footerView, UIButton * _Nonnull agreementBtn) { 162 self.footerView.clickAgreementButtonBlock = ^(CNLiveBOrganizationTVFooteriew * _Nonnull footerView, UIButton * _Nonnull agreementBtn) {
163 footerView.agreementBtn.selected = ! footerView.agreementBtn.selected; 163 footerView.agreementBtn.selected = ! footerView.agreementBtn.selected;
164 -#pragma mark - TODO: 记录内容  
165 164
166 }; 165 };
167 self.footerView.clickAgreementLBlock = ^(CNLiveBOrganizationTVFooteriew * _Nonnull footerView, UILabel * _Nonnull agreementL) { 166 self.footerView.clickAgreementLBlock = ^(CNLiveBOrganizationTVFooteriew * _Nonnull footerView, UILabel * _Nonnull agreementL) {
@@ -506,8 +505,7 @@ @@ -506,8 +505,7 @@
506 [self.tableView reloadData]; 505 [self.tableView reloadData];
507 } 506 }
508 507
509 -  
510 -#pragma mark - TODO: 获取图片 508 +
511 if (self.navigationController) { 509 if (self.navigationController) {
512 [self.navigationController popViewControllerAnimated:YES]; 510 [self.navigationController popViewControllerAnimated:YES];
513 } 511 }
@@ -706,18 +704,13 @@ @@ -706,18 +704,13 @@
706 704
707 705
708 706
709 -  
710 -#pragma mark - TODO:  
711 #pragma mark - *** 事件实现 *** 707 #pragma mark - *** 事件实现 ***
712 708
713 - (void)jumpCommitVC { 709 - (void)jumpCommitVC {
714 710
715 711
716 NSLog(@"公司全称 = %@,企业logo上传路径 = %@,企业简称 = %@,企业代码 = %@,企业简介 = %@,企业地址 = %@,选择企业类型 = %@,webUrl = %@,法人 = %@,联系人* = %@,合同编号 = %@,营业执照编号 = %@,营业执照 = %@",self.companyName,self.logoUrl,self.companyShortName,self.companyId,self.companyContent,self.companyAdress,self.tipModel.name,self.webUrl,self.legalPerson,self.contact,self.contractCount,self.licenseCount,self.licenseImageUrl); 712 NSLog(@"公司全称 = %@,企业logo上传路径 = %@,企业简称 = %@,企业代码 = %@,企业简介 = %@,企业地址 = %@,选择企业类型 = %@,webUrl = %@,法人 = %@,联系人* = %@,合同编号 = %@,营业执照编号 = %@,营业执照 = %@",self.companyName,self.logoUrl,self.companyShortName,self.companyId,self.companyContent,self.companyAdress,self.tipModel.name,self.webUrl,self.legalPerson,self.contact,self.contractCount,self.licenseCount,self.licenseImageUrl);
717 -  
718 - // CNLiveBAgreementCommitFinishController *commitVC = [[CNLiveBAgreementCommitFinishController alloc]init];  
719 - // [self.navigationController pushViewController:commitVC animated:YES];  
720 - 713 +
721 if (!self.footerView.agreementBtn.isSelected) { 714 if (!self.footerView.agreementBtn.isSelected) {
722 [QMUITips showWithText:@"请同意安全协议" inView:self.view hideAfterDelay:0.5]; 715 [QMUITips showWithText:@"请同意安全协议" inView:self.view hideAfterDelay:0.5];
723 return; 716 return;
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailCell.h
@@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN
17 17
18 @property (strong, nonatomic) NSIndexPath *indexPath; 18 @property (strong, nonatomic) NSIndexPath *indexPath;
19 19
20 -- (void)editUIWithIndexPath:(NSIndexPath *)indexPath detailModel:(CNLiveOrganizationDetailModel *)detailModel; 20 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath detailModel:(CNLiveOrganizationDetailModel *)detailModel kindStr:(NSString *)kindStr;
21 21
22 @end 22 @end
23 23
CNLiveOrganizationValidationModule/Classes/CNLiveOrganizationValidationModule/View/CNLiveBOrganizationDetailCell.m
@@ -76,7 +76,7 @@ @@ -76,7 +76,7 @@
76 #pragma mark - ***监听实现*** 76 #pragma mark - ***监听实现***
77 77
78 #pragma mark - ***editUI** 78 #pragma mark - ***editUI**
79 -- (void)editUIWithIndexPath:(NSIndexPath *)indexPath detailModel:(CNLiveOrganizationDetailModel *)detailModel { 79 +- (void)editUIWithIndexPath:(NSIndexPath *)indexPath detailModel:(CNLiveOrganizationDetailModel *)detailModel kindStr:(NSString *)kindStr {
80 80
81 81
82 if (!indexPath) { 82 if (!indexPath) {
@@ -150,12 +150,10 @@ @@ -150,12 +150,10 @@
150 150
151 NSString *titleStr = @"企业类型:"; 151 NSString *titleStr = @"企业类型:";
152 NSString *content = @""; 152 NSString *content = @"";
153 - if (isDetail) {  
154 - content = [NSString stringWithFormat:@"%@",detailModel.account.com_type_id?detailModel.account.com_type_id:@""]; 153 + if (isDetail && kindStr && kindStr.length > 0) {
  154 + content = [NSString stringWithFormat:@"%@",kindStr?kindStr:@""];
155 } 155 }
156 156
157 -  
158 -  
159 NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:content]; 157 NSMutableAttributedString *str = [self returnAllContentWithTitle:titleStr content:content];
160 self.contentL.attributedText = str; 158 self.contentL.attributedText = str;
161 159