Commit a63f8bf0172f5d1cfb4007d1ba0c5367549f2d61

Authored by yinqiaojuan
1 parent af7d2e72

修改个人资料验证失败问题

CNLiveBPersonalVerificationModule.podspec
... ... @@ -32,94 +32,53 @@ TODO: Add long description of the pod here.
32 32  
33 33 # s.source_files = 'CNLiveBPersonalVerificationModule/Classes/**/*'
34 34 s.subspec 'CNBInstitutionInfo' do |institution|
35   - institution.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/**'
36   - institution.subspec 'Controller' do |controller|
37   - controller.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/*.{h,m}'
38   - controller.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/View'
39   - end
40   - institution.subspec 'View' do |view|
41   - view.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/*.{h,m}'
42   - view.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/ViewModel'
43   - view.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/Model'
44   - end
45 35 institution.subspec 'Model' do |model|
46 36 model.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Model/*.{h,m}'
47 37 end
48 38 institution.subspec 'ViewModel' do |viewModel|
49   - viewModel.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/*.{h,m}'
50   - viewModel.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/Model'
51   - end
  39 + viewModel.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/*.{h,m}'
  40 + viewModel.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/Model'
  41 + end
  42 + institution.subspec 'View' do |view|
  43 + view.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/View/*.{h,m}'
  44 + view.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/ViewModel'
  45 + end
  46 + institution.subspec 'Controller' do |controller|
  47 + controller.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/*.{h,m}'
  48 + controller.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/View'
  49 + end
52 50 institution.subspec 'Services' do |service|
53   - service.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Services/*.{h,m}'
54   - end
55   - institution.resource_bundles = {
56   - 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle']
57   - }
  51 + service.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Services/*.{h,m}'
  52 + service.dependency 'CNLiveBPersonalVerificationModule/CNBInstitutionInfo/Controller'
  53 + end
58 54 institution.dependency 'CNLiveTripartiteManagement/Masonry'
59 55 institution.dependency 'CNLiveTripartiteManagement/QMUIKit'
60 56 institution.dependency 'CNLiveTripartiteManagement/MJExtension'
61 57 institution.dependency 'CNLiveTripartiteManagement/SDWebImage'
62 58 institution.dependency 'CNLiveTripartiteManagement/MJRefresh'
63   - institution.dependency 'CNLiveTripartiteManagement/YYKit'
  59 + #institution.dependency 'CNLiveTripartiteManagement/YYKit'
64 60 institution.dependency 'CNLiveTripartiteManagement/AFNetworking'
65 61 #基础库
66 62 institution.dependency 'CNLiveBaseKit'
67 63 #基础类目
68 64 institution.dependency 'CNLiveCommonCategory'
69   - #基础UI
  65 +# #基础UI
70 66 institution.dependency 'CNLiveCustomUI'
71   - #用户库
  67 +# #用户库
72 68 institution.dependency 'CNLiveUserManagement'
73   - #网络请求
  69 +# #网络请求
74 70 institution.dependency 'CNLiveRequestBastKit'
75   - #环境库
  71 +# #环境库
76 72 institution.dependency 'CNLiveEnvironment'
77   - #基础库
78   - institution.dependency 'CNLiveBaseClass'
79   - #协议库
  73 +# #基础库
  74 +# institution.dependency 'CNLiveBaseClass'
  75 +# #协议库
80 76 institution.dependency 'CNLiveBeeHive'
81 77 institution.dependency 'CNLiveBServices'
82   - end
83   -#s.subspec 'CNBPersonCardInfo' do |card|
84   -# card.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/**'
85   -# card.subspec 'Controller' do |controller|
86   -# controller.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Controller/*.{h,m}'
87   -# controller.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/View'
88   -# end
89   -# card.subspec 'View' do |view|
90   -# view.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/View/*.{h,m}'
91   -# view.dependency 'CNLiveBPersonalVerificationModule/CNBPersonCardInfo/Model'
92   -# end
93   -# card.subspec 'Model' do |model|
94   -# model.source_files = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/Model/*.{h,m}'
95   -# end
96   -# card.ios.vendored_frameworks = 'CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipOcrSdk.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/AipBase.framework','CNLiveBPersonalVerificationModule/Classes/CNBPersonCardInfo/baiduSDKs/IdcardQuality.framework'
97   -# card.resource_bundles = {
98   -# 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBPersonCardInfo/CNBPersonCardInfo.bundle']
99   -# }
100   -# card.dependency 'CNLiveTripartiteManagement/Masonry'
101   -# card.dependency 'CNLiveTripartiteManagement/QMUIKit'
102   -# card.dependency 'CNLiveTripartiteManagement/MJExtension'
103   -# card.dependency 'CNLiveTripartiteManagement/SDWebImage'
104   -# card.dependency 'CNLiveTripartiteManagement/MJRefresh'
105   -# card.dependency 'CNLiveTripartiteManagement/YYKit'
106   -# card.dependency 'CNLiveTripartiteManagement/AFNetworking'
107   -# #基础库
108   -# card.dependency 'CNLiveBaseKit'
109   -# #基础类目
110   -# card.dependency 'CNLiveCommonCategory'
111   -# ##基础UI
112   -# card.dependency 'CNLiveCustomUI'
113   -# ##用户库
114   -# card.dependency 'CNLiveUserManagement'
115   -# # #网络请求
116   -# card.dependency 'CNLiveRequestBastKit'
117   -# card.dependency 'CNLiveEnvironment'
118   -# card.dependency 'CNLiveBaseClass'
119   -# card.dependency 'CNLiveBaseTools'
120   -# card.dependency 'CNLiveBusinessTools'
121   -# end
122   -
  78 +institution.resource_bundles = {
  79 + 'CNLiveBPersonalVerificationModule' => ['CNLiveBPersonalVerificationModule/Assets/CNBInstitutionInfo/CNLiveBPersonalVerificationModule.bundle']
  80 + }
123 81  
  82 + end
124 83 s.frameworks = 'UIKit', 'Foundation'
125 84 end
... ...
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/Controller/CNBPerAuthSuccessController.m
... ... @@ -45,7 +45,7 @@ static NSString *groupIdentifier = @"CNBGroupInfoCell";
45 45 [super viewDidLoad];
46 46 [self.view addSubview:self.tableView];
47 47 self.title = @"身份校验";
48   - if (self.data && [self.data isKindOfClass:[NSDictionary class]]) {
  48 + if (self.data && [self.data isKindOfClass:[NSDictionary class]] && self.data.count > 0) {
49 49 CNBPerCertificationSuccessModel *successModel = [CNBPerCertificationSuccessModel mj_objectWithKeyValues:self.data];
50 50 self.infoModel = successModel.bUserIdentity;
51 51 for (CNBInstitutionModel *model in successModel.institution) {
... ...
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthManager.h
... ... @@ -6,7 +6,6 @@
6 6 //
7 7  
8 8 #import <Foundation/Foundation.h>
9   -#import "YYCache.h"
10 9 NS_ASSUME_NONNULL_BEGIN
11 10  
12 11 @interface CNBPerAuthManager : NSObject
... ...
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthManager.m
... ... @@ -8,7 +8,6 @@
8 8 #import "CNBPerAuthManager.h"
9 9 #import "CNUserInfoManager.h"
10 10 #import "NSString+CNLiveExtension.h"
11   -static YYCache *yycache = nil;
12 11 @interface CNBPerAuthManager ()
13 12  
14 13 @end
... ...
CNLiveBPersonalVerificationModule/Classes/CNBInstitutionInfo/ViewModel/CNBPerAuthViewModel.m
... ... @@ -12,6 +12,7 @@
12 12 #import <QMUIKit/QMUIKit.h>
13 13 #import "CNBPerCertificationSuccessModel.h"
14 14 #import "CNLiveBaseKit.h"
  15 +#import "CNLiveEnvironment.h"
15 16 #define CNBAppKeyWindow ([UIApplication sharedApplication].delegate).window
16 17 @implementation CNBPerAuthViewModel
17 18 #pragma mark - 请求机构等列表
... ... @@ -26,7 +27,7 @@
26 27  
27 28 [CNLiveNetworking setupShowDataResult:NO];
28 29 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
29   - NSString *url = @"http://cmstest.cnlive.com:8768/contentApi/getAllSp";
  30 + NSString *url = cn_API_Classify(@"/contentApi/getAllSp");
30 31 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:url Param:param CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
31 32 if (responseObject && [responseObject isKindOfClass:[NSDictionary class]]) {
32 33 NSString *errorCode = [NSString stringWithFormat:@"%@",[responseObject objectForKey:@"errorCode"]];
... ... @@ -61,7 +62,7 @@
61 62 NSDictionary *param = @{
62 63 @"institution":CNLiveStringIsEmpty(institutionStr) ? @"":institutionStr
63 64 };
64   - NSString *url = @"https://apiwjjtest.cnlive.com/Daren/buser/saveInstitution.action";
  65 + NSString *url = cn_API_Host(@"/Daren/buser/saveInstitution.action");
65 66 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:url Param:param CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
66 67 if (!error) {
67 68 if (responseObject && [responseObject isKindOfClass:[NSDictionary class]]) {
... ... @@ -86,7 +87,8 @@
86 87 [CNLiveNetworking setupShowDataResult:NO];
87 88 [CNLiveNetworking setAllowRequestDefaultArgument:YES];
88 89 NSMutableArray *array = [NSMutableArray array];
89   - NSString *url = @"https://apiwjjtest.cnlive.com/Daren/buser/getBUserInfo.action";
  90 + NSString *url = cn_API_Host(@"/Daren/buser/getBUserInfo.action");
  91 +// NSString *url = @"https://apiwjjtest.cnlive.com/Daren/buser/getBUserInfo.action";
90 92 [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:url Param:param CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
91 93 if (!error) {
92 94 if (responseObject && [responseObject isKindOfClass:[NSDictionary class]]) {
... ...
Example/CNLiveBPersonalVerificationModule.xcodeproj/project.pbxproj
... ... @@ -358,12 +358,9 @@
358 358 "${PODS_ROOT}/Target Support Files/Pods-CNLiveBPersonalVerificationModule_Example/Pods-CNLiveBPersonalVerificationModule_Example-frameworks.sh",
359 359 "${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
360 360 "${BUILT_PRODUCTS_DIR}/CNLiveBPersonalVerificationModule/CNLiveBPersonalVerificationModule.framework",
361   - "${BUILT_PRODUCTS_DIR}/CNLiveBaseClass/CNLiveBaseClass.framework",
362 361 "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
363 362 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
364   - "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
365 363 "${BUILT_PRODUCTS_DIR}/CNLiveCommonCategory/CNLiveCommonCategory.framework",
366   - "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework",
367 364 "${BUILT_PRODUCTS_DIR}/CNLiveCustomUI/CNLiveCustomUI.framework",
368 365 "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",
369 366 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
... ... @@ -374,19 +371,15 @@
374 371 "${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
375 372 "${BUILT_PRODUCTS_DIR}/QMUIKit/QMUIKit.framework",
376 373 "${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
377   - "${BUILT_PRODUCTS_DIR}/WebViewJavascriptBridge/WebViewJavascriptBridge.framework",
378 374 "${BUILT_PRODUCTS_DIR}/YYKit/YYKit.framework",
379 375 );
380 376 name = "[CP] Embed Pods Frameworks";
381 377 outputPaths = (
382 378 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
383 379 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBPersonalVerificationModule.framework",
384   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseClass.framework",
385 380 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
386 381 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
387   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
388 382 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCommonCategory.framework",
389   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework",
390 383 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomUI.framework",
391 384 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",
392 385 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
... ... @@ -397,7 +390,6 @@
397 390 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
398 391 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/QMUIKit.framework",
399 392 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
400   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/WebViewJavascriptBridge.framework",
401 393 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/YYKit.framework",
402 394 );
403 395 runOnlyForDeploymentPostprocessing = 0;
... ...
Example/CNLiveBPersonalVerificationModule/CNLIVEViewController.m
... ... @@ -10,6 +10,7 @@
10 10 #import "CNBPersonalVerificationController.h"
11 11 #import "CNBPerAuthSuccessController.h"
12 12 #import "CNBPerCertificationController.h"
  13 +#import "CNLiveBPersonAuthentProtocol.h"
13 14 @interface CNLIVEViewController ()
14 15  
15 16 @end
... ... @@ -38,12 +39,18 @@
38 39 [self.view addSubview:button];
39 40 }
40 41 }
  42 +
41 43 - (void)buttonAction {
42 44 CNBPersonalVerificationController *vc = [[CNBPersonalVerificationController alloc]init];
43 45 [self.navigationController pushViewController:vc animated:NO];
  46 +// id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)];
  47 +// CNBPersonalVerificationController *vc = (CNBPersonalVerificationController *)[service pushToAddPerAuthInstitutionsController:@{}];
  48 +// [self.navigationController pushViewController:vc animated:NO];
44 49 }
45 50 - (void)successBtnAction {
46   - CNBPerAuthSuccessController *vc = [[CNBPerAuthSuccessController alloc]init];
  51 + id <CNLiveBPersonAuthentProtocol>service = [[BeeHive shareInstance]createService:@protocol(CNLiveBPersonAuthentProtocol)];
  52 + CNBPerAuthSuccessController *vc = (CNBPerAuthSuccessController *)[service pushToPersonalAuthenticationSuccessController:@{}];
  53 +// CNBPerAuthSuccessController *vc = [[CNBPerAuthSuccessController alloc]init];
47 54 [self.navigationController pushViewController:vc animated:NO];
48 55 }
49 56 - (void)buttonClick:(UIButton *)sender {
... ... @@ -59,6 +66,7 @@
59 66 [self.navigationController pushViewController:vc animated:NO];
60 67 }
61 68 }
  69 +
62 70 - (void)didReceiveMemoryWarning
63 71 {
64 72 [super didReceiveMemoryWarning];
... ...