Commit b986563fba67810ad2eed95c87ce22b90aa6e32a

Authored by iOS-Xiaowen
1 parent ec4fdde9

no message

Showing 23 changed files with 374 additions and 357 deletions
CNLiveLoginModule.podspec
@@ -72,9 +72,7 @@ TODO: 网家家-登录模块. @@ -72,9 +72,7 @@ TODO: 网家家-登录模块.
72 72
73 # s.public_header_files = 'Pod/Classes/**/*.h' 73 # s.public_header_files = 'Pod/Classes/**/*.h'
74 # s.frameworks = 'UIKit', 'MapKit' 74 # s.frameworks = 'UIKit', 'MapKit'
75 -  
76 - s.dependency 'CNLiveServices'  
77 - 75 +
78 # pod 76 # pod
79 s.dependency 'CNLiveSDKs/CNLiveUserSystemSDK', '~> 0.3.1.3' #GitHub所以指定版本号 77 s.dependency 'CNLiveSDKs/CNLiveUserSystemSDK', '~> 0.3.1.3' #GitHub所以指定版本号
80 s.dependency 'CNLiveTripartiteManagement/QMUIKit' 78 s.dependency 'CNLiveTripartiteManagement/QMUIKit'
@@ -116,7 +114,7 @@ TODO: 网家家-登录模块. @@ -116,7 +114,7 @@ TODO: 网家家-登录模块.
116 s.dependency 'tingyunApp', '~>2.14.0' 114 s.dependency 'tingyunApp', '~>2.14.0'
117 115
118 # 分享 116 # 分享
119 - s.dependency 'CNLiveShareToolKit' 117 +# s.dependency 'CNLiveShareToolKit'
120 118
121 # 类别 119 # 类别
122 s.dependency 'CNLiveCategory' 120 s.dependency 'CNLiveCategory'
CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_get_code_b.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "login_get_code_b@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "login_get_code_b@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_get_code_b.imageset/login_get_code_b@2x.png 0 → 100644

7.27 KB

CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_get_code_b.imageset/login_get_code_b@3x.png 0 → 100644

17.9 KB

CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_logo_b.imageset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "universal",
  5 + "scale" : "1x"
  6 + },
  7 + {
  8 + "filename" : "login_logo_b@2x.png",
  9 + "idiom" : "universal",
  10 + "scale" : "2x"
  11 + },
  12 + {
  13 + "filename" : "login_logo_b@3x.png",
  14 + "idiom" : "universal",
  15 + "scale" : "3x"
  16 + }
  17 + ],
  18 + "info" : {
  19 + "author" : "xcode",
  20 + "version" : 1
  21 + }
  22 +}
CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_logo_b.imageset/login_logo_b@2x.png 0 → 100644

24.8 KB

CNLiveLoginModule/Assets/CNLiveLoginModule.xcassets/login_logo_b.imageset/login_logo_b@3x.png 0 → 100644

48.4 KB

CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageCell.m
@@ -8,6 +8,9 @@ @@ -8,6 +8,9 @@
8 8
9 #import "CNLiveBindingManageCell.h" 9 #import "CNLiveBindingManageCell.h"
10 #import <Masonry/Masonry.h> 10 #import <Masonry/Masonry.h>
  11 +#import "QMUIKit.h"
  12 +#import "CNLiveBaseKit.h"
  13 +#import <CNLiveRequestBastKit/CNLiveNetworking.h>
11 14
12 #import "CNLiveBindingManageModel.h" 15 #import "CNLiveBindingManageModel.h"
13 #import "CNLiveBindingManageRequest.h" 16 #import "CNLiveBindingManageRequest.h"
@@ -31,7 +34,7 @@ static NSInteger const margin = 15; @@ -31,7 +34,7 @@ static NSInteger const margin = 15;
31 } 34 }
32 return self; 35 return self;
33 } 36 }
34 -- (void)setModel:(CNBindingManageModel *)model{ 37 +- (void)setModel:(CNLiveBindingManageModel *)model{
35 _model = model; 38 _model = model;
36 _icon.image = [UIImage imageNamed:model.image]; 39 _icon.image = [UIImage imageNamed:model.image];
37 _title.text = model.title; 40 _title.text = model.title;
@@ -160,7 +163,7 @@ static NSInteger const margin = 15; @@ -160,7 +163,7 @@ static NSInteger const margin = 15;
160 return; 163 return;
161 } 164 }
162 if(![CNLiveNetworking isNetworking]){ 165 if(![CNLiveNetworking isNetworking]){
163 - [QMUITips showError:@"无法连接网络" inView:AppKeyWindow hideAfterDelay:1.5]; 166 + [QMUITips showError:@"无法连接网络" inView:([UIApplication sharedApplication].delegate).window hideAfterDelay:1.5];
164 return ; 167 return ;
165 } 168 }
166 btn.userInteractionEnabled = NO; 169 btn.userInteractionEnabled = NO;
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageController.m
@@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
8 8
9 #import "CNLiveBindingManageController.h" 9 #import "CNLiveBindingManageController.h"
10 #import <Masonry/Masonry.h> 10 #import <Masonry/Masonry.h>
  11 +#import "CNLiveBaseKit.h"
11 12
12 #import "CNLiveBindingManageHeaderView.h" 13 #import "CNLiveBindingManageHeaderView.h"
13 #import "CNLiveBindingManageCell.h" 14 #import "CNLiveBindingManageCell.h"
@@ -50,38 +51,38 @@ @@ -50,38 +51,38 @@
50 51
51 } 52 }
52 - (void)requestBindingManage:(CNLiveBindingManageModel *)model{ 53 - (void)requestBindingManage:(CNLiveBindingManageModel *)model{
53 - switch (model.type) {  
54 - case CNLiveSendAuthRespWX:  
55 - {  
56 - if(![WXApi isWXAppInstalled]){  
57 - [QMUITips showWithText:@"未安装微信" inView:self.view hideAfterDelay:1.5];  
58 - return;  
59 - }  
60 - }  
61 - break;  
62 - case CNLiveSendAuthRespQQ:  
63 - {  
64 - if(![TencentOAuth iphoneQQInstalled]){  
65 - [QMUITips showWithText:@"未安装QQ" inView:self.view hideAfterDelay:1.5];  
66 - return;  
67 - }  
68 - }  
69 - break;  
70 - case CNLiveSendAuthRespWB:  
71 - {  
72 - if(![WeiboSDK isWeiboAppInstalled]){  
73 - [QMUITips showWithText:@"未安装微博" inView:self.view hideAfterDelay:1.5];  
74 - return;  
75 - }  
76 - }  
77 - break;  
78 - case CNLiveSendAuthRespApple:  
79 - {  
80 - }  
81 - break;  
82 - } 54 +// switch (model.type) {
  55 +// case CNLiveSendAuthRespWX:
  56 +// {
  57 +// if(![WXApi isWXAppInstalled]){
  58 +// [QMUITips showWithText:@"未安装微信" inView:self.view hideAfterDelay:1.5];
  59 +// return;
  60 +// }
  61 +// }
  62 +// break;
  63 +// case CNLiveSendAuthRespQQ:
  64 +// {
  65 +// if(![TencentOAuth iphoneQQInstalled]){
  66 +// [QMUITips showWithText:@"未安装QQ" inView:self.view hideAfterDelay:1.5];
  67 +// return;
  68 +// }
  69 +// }
  70 +// break;
  71 +// case CNLiveSendAuthRespWB:
  72 +// {
  73 +// if(![WeiboSDK isWeiboAppInstalled]){
  74 +// [QMUITips showWithText:@"未安装微博" inView:self.view hideAfterDelay:1.5];
  75 +// return;
  76 +// }
  77 +// }
  78 +// break;
  79 +// case CNLiveSendAuthRespApple:
  80 +// {
  81 +// }
  82 +// break;
  83 +// }
83 __weak typeof(self) weakSelf = self; 84 __weak typeof(self) weakSelf = self;
84 - [CNLiveBindingManageRequest requestModel:model block:^(BOOL isSuccess, CNBindingManageModel * _Nullable model, BOOL isBinding) { 85 + [CNLiveBindingManageRequest requestModel:model block:^(BOOL isSuccess, CNLiveBindingManageModel * _Nullable model, BOOL isBinding) {
85 __strong typeof(weakSelf) strongSelf = weakSelf; 86 __strong typeof(weakSelf) strongSelf = weakSelf;
86 if(!strongSelf) return; 87 if(!strongSelf) return;
87 if(isSuccess){ 88 if(isSuccess){
@@ -161,7 +162,7 @@ @@ -161,7 +162,7 @@
161 } 162 }
162 163
163 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 164 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
164 - CNBindingManageCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNBindingManageCell forIndexPath:indexPath]; 165 + CNLiveBindingManageCell *cell = [tableView dequeueReusableCellWithIdentifier:kCNLiveBindingManageCell forIndexPath:indexPath];
165 cell.selectionStyle = UITableViewCellSelectionStyleNone; 166 cell.selectionStyle = UITableViewCellSelectionStyleNone;
166 cell.delegate = self; 167 cell.delegate = self;
167 if(indexPath.section == 0){ 168 if(indexPath.section == 0){
@@ -189,7 +190,7 @@ @@ -189,7 +190,7 @@
189 190
190 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { 191 - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
191 NSArray *array = @[@"您已绑定网家家手机号账号", @"其他绑定方式"]; 192 NSArray *array = @[@"您已绑定网家家手机号账号", @"其他绑定方式"];
192 - CNBindingManageHeaderView *header = [tableView dequeueReusableHeaderFooterViewWithIdentifier:kCNBindingManageHeaderView]; 193 + CNLiveBindingManageHeaderView *header = [tableView dequeueReusableHeaderFooterViewWithIdentifier:kCNLiveBindingManageHeaderView];
193 header.text = array[section]; 194 header.text = array[section];
194 return header; 195 return header;
195 196
@@ -223,8 +224,8 @@ @@ -223,8 +224,8 @@
223 _tableView.estimatedRowHeight = 0; 224 _tableView.estimatedRowHeight = 0;
224 _tableView.estimatedSectionFooterHeight = 0; 225 _tableView.estimatedSectionFooterHeight = 0;
225 _tableView.estimatedSectionHeaderHeight = 0; 226 _tableView.estimatedSectionHeaderHeight = 0;
226 - [_tableView registerClass:[CNBindingManageCell class] forCellReuseIdentifier:kCNBindingManageCell];  
227 - [_tableView registerClass:[CNBindingManageHeaderView class] forHeaderFooterViewReuseIdentifier:kCNBindingManageHeaderView]; 227 + [_tableView registerClass:[CNLiveBindingManageCell class] forCellReuseIdentifier:kCNLiveBindingManageCell];
  228 + [_tableView registerClass:[CNLiveBindingManageHeaderView class] forHeaderFooterViewReuseIdentifier:kCNLiveBindingManageHeaderView];
228 229
229 } 230 }
230 return _tableView; 231 return _tableView;
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageHeaderView.m
@@ -19,7 +19,7 @@ static NSInteger const margin = 15; @@ -19,7 +19,7 @@ static NSInteger const margin = 15;
19 - (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier { 19 - (instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier {
20 if (self = [super initWithReuseIdentifier:reuseIdentifier]) { 20 if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
21 //在这里向contentView添加控件 21 //在这里向contentView添加控件
22 - self.backgroundColor = RGBOF(0xf4f4f4); 22 + self.backgroundColor = [UIColor colorWithRed:244/255.0 green:244/255.0 blue:244/255.0 alpha:1.0];
23 [self createSubviews]; 23 [self createSubviews];
24 [self xw_layoutSubviews]; 24 [self xw_layoutSubviews];
25 25
@@ -60,8 +60,8 @@ static NSInteger const margin = 15; @@ -60,8 +60,8 @@ static NSInteger const margin = 15;
60 - (UILabel *)title { 60 - (UILabel *)title {
61 if (!_title) { 61 if (!_title) {
62 _title = [[UILabel alloc] init]; 62 _title = [[UILabel alloc] init];
63 - _title.textColor = RGBOF(0x999999);  
64 - _title.font = UIFontCNMake(14); 63 + _title.textColor = [UIColor colorWithRed:153/255.0 green:153/255.0 blue:153/255.0 alpha:1.0];
  64 + _title.font = [UIFont systemFontOfSize:14];
65 _title.numberOfLines = 0; 65 _title.numberOfLines = 0;
66 } 66 }
67 return _title; 67 return _title;
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageModel.h
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 // 7 //
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 -#import "CNLiveShareImageManager.h" 10 +//#import "CNLiveShareImageManager.h"
11 11
12 NS_ASSUME_NONNULL_BEGIN 12 NS_ASSUME_NONNULL_BEGIN
13 13
@@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN @@ -19,7 +19,7 @@ NS_ASSUME_NONNULL_BEGIN
19 19
20 @property (nonatomic, copy) NSString *thirdPartyPlat; 20 @property (nonatomic, copy) NSString *thirdPartyPlat;
21 @property (nonatomic, copy) NSString *thirdPartyId; 21 @property (nonatomic, copy) NSString *thirdPartyId;
22 -@property (nonatomic, assign) CNLiveSendAuthResp type; 22 +//@property (nonatomic, assign) CNLiveSendAuthResp type;
23 23
24 24
25 @end 25 @end
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageModel.m
@@ -9,24 +9,24 @@ @@ -9,24 +9,24 @@
9 #import "CNLiveBindingManageModel.h" 9 #import "CNLiveBindingManageModel.h"
10 10
11 @implementation CNLiveBindingManageModel 11 @implementation CNLiveBindingManageModel
12 -- (CNLiveSendAuthResp)type{  
13 - CNLiveSendAuthResp type = CNLiveSendAuthRespWX;  
14 -  
15 - if([self.thirdPartyPlat isEqualToString:@"1"]){  
16 - type = CNLiveSendAuthRespWB;  
17 -  
18 - }else if ([self.thirdPartyPlat isEqualToString:@"2"]){  
19 - type = CNLiveSendAuthRespQQ;  
20 -  
21 - }else if([self.thirdPartyPlat isEqualToString:@"3"]){  
22 - type = CNLiveSendAuthRespWX;  
23 -  
24 - }else if([self.thirdPartyPlat isEqualToString:@"5"]){  
25 - type = CNLiveSendAuthRespApple;  
26 -  
27 - }  
28 - return type;  
29 -  
30 -} 12 +//- (CNLiveSendAuthResp)type{
  13 +// CNLiveSendAuthResp type = CNLiveSendAuthRespWX;
  14 +//
  15 +// if([self.thirdPartyPlat isEqualToString:@"1"]){
  16 +// type = CNLiveSendAuthRespWB;
  17 +//
  18 +// }else if ([self.thirdPartyPlat isEqualToString:@"2"]){
  19 +// type = CNLiveSendAuthRespQQ;
  20 +//
  21 +// }else if([self.thirdPartyPlat isEqualToString:@"3"]){
  22 +// type = CNLiveSendAuthRespWX;
  23 +//
  24 +// }else if([self.thirdPartyPlat isEqualToString:@"5"]){
  25 +// type = CNLiveSendAuthRespApple;
  26 +//
  27 +// }
  28 +// return type;
  29 +//
  30 +//}
31 31
32 @end 32 @end
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageRequest.h
@@ -7,10 +7,10 @@ @@ -7,10 +7,10 @@
7 // 7 //
8 8
9 #import <Foundation/Foundation.h> 9 #import <Foundation/Foundation.h>
10 -#import "CNLiveShareImageManager.h" 10 +//#import "CNLiveShareImageManager.h"
11 11
12 NS_ASSUME_NONNULL_BEGIN 12 NS_ASSUME_NONNULL_BEGIN
13 -@class CNBindingManageModel; 13 +@class CNLiveBindingManageModel;
14 @class CNThreeLoginModel; 14 @class CNThreeLoginModel;
15 15
16 typedef void (^CNLiveBindingResponseBlock)(BOOL isSuccess, CNLiveBindingManageModel * _Nullable model, BOOL isBinding); 16 typedef void (^CNLiveBindingResponseBlock)(BOOL isSuccess, CNLiveBindingManageModel * _Nullable model, BOOL isBinding);
@@ -40,7 +40,7 @@ typedef void (^CNLiveLoginResponseBlock)(NSURLSessionTask *requestTask, id respo @@ -40,7 +40,7 @@ typedef void (^CNLiveLoginResponseBlock)(NSURLSessionTask *requestTask, id respo
40 * @param model 模型 40 * @param model 模型
41 * @param block 回调 41 * @param block 回调
42 */ 42 */
43 -+ (void)thirdPartyLoginWithType:(CNLiveSendAuthResp)type model:(CNThreeLoginModel *)model block:(CNLoginResponseBlock)block; 43 +//+ (void)thirdPartyLoginWithType:(CNLiveSendAuthResp)type model:(CNThreeLoginModel *)model block:(CNLoginResponseBlock)block;
44 44
45 @end 45 @end
46 46
CNLiveLoginModule/Classes/BindingManage/CNLiveBindingManageRequest.m
@@ -7,124 +7,129 @@ @@ -7,124 +7,129 @@
7 // 7 //
8 8
9 #import "CNLiveBindingManageRequest.h" 9 #import "CNLiveBindingManageRequest.h"
  10 +#import "QMUIKit.h"
  11 +#import <CNLiveRequestBastKit/CNLiveNetworking.h>
  12 +#import "CNUserInfoManager.h"
  13 +
10 #import "CNLiveBindingManageModel.h" 14 #import "CNLiveBindingManageModel.h"
11 -#import "CNThreeLoginModel.h"  
12 -#import "CNLiveShareImageManager.h" 15 +
  16 +//#import "CNThreeLoginModel.h"
  17 +//#import "CNLiveShareImageManager.h"
13 18
14 @implementation CNLiveBindingManageRequest 19 @implementation CNLiveBindingManageRequest
15 + (void)requestModel:(CNLiveBindingManageModel *)model block:(CNLiveBindingResponseBlock)block{ 20 + (void)requestModel:(CNLiveBindingManageModel *)model block:(CNLiveBindingResponseBlock)block{
16 if([model.isBinding isEqualToString:@"1"]){ 21 if([model.isBinding isEqualToString:@"1"]){
17 //解除绑定操作 22 //解除绑定操作
18 - [CNLiveBindingManageRequest requestUnBindingModel:model block:^(BOOL isSuccess, CNBindingManageModel * _Nullable model, BOOL isBinding) { 23 + [CNLiveBindingManageRequest requestUnBindingModel:model block:^(BOOL isSuccess, CNLiveBindingManageModel * _Nullable model, BOOL isBinding) {
19 block?block(isSuccess, model, isBinding):@""; 24 block?block(isSuccess, model, isBinding):@"";
20 }]; 25 }];
21 } 26 }
22 else{ 27 else{
23 //绑定操作 28 //绑定操作
24 - [CNLiveBindingManageRequest requestBindingModel:model block:^(BOOL isSuccess, CNBindingManageModel * _Nullable model, BOOL isBinding) { 29 + [CNLiveBindingManageRequest requestBindingModel:model block:^(BOOL isSuccess, CNLiveBindingManageModel * _Nullable model, BOOL isBinding) {
25 block?block(isSuccess, model, isBinding):@""; 30 block?block(isSuccess, model, isBinding):@"";
26 }]; 31 }];
27 } 32 }
28 } 33 }
29 34
30 //绑定操作 35 //绑定操作
31 -+ (void)requestBindingModel:(CNLiveBindingManageModel *)model block:(CNBindingResponseBlock)block{ 36 ++ (void)requestBindingModel:(CNLiveBindingManageModel *)model block:(CNLiveBindingResponseBlock)block{
32 __weak typeof(self) weakSelf = self; 37 __weak typeof(self) weakSelf = self;
33 // 获取第三方id 38 // 获取第三方id
34 - [CNLiveShareImageManager send:model.type authRespBlock:^(CNLiveSendAuthResp type, CNLiveThirdPartyModel *userInfo, NSError *error) {  
35 - __strong typeof(weakSelf) strongSelf = weakSelf;  
36 - if(!strongSelf) return;  
37 - if(error){  
38 - if(error.code == 10000){  
39 - //用户取消  
40 - }else{  
41 - [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];  
42 - }  
43 - return ;  
44 - }  
45 - if(userInfo.thirdPartyId&&![userInfo.thirdPartyId isEqualToString:@""]){  
46 - // 发起绑定请求  
47 - model.thirdPartyId = userInfo.thirdPartyId;  
48 - [strongSelf sendBindingModel:model block:block];  
49 -  
50 - }else{  
51 - [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];  
52 -  
53 - }  
54 -  
55 - }]; 39 +// [CNLiveShareImageManager send:model.type authRespBlock:^(CNLiveSendAuthResp type, CNLiveThirdPartyModel *userInfo, NSError *error) {
  40 +// __strong typeof(weakSelf) strongSelf = weakSelf;
  41 +// if(!strongSelf) return;
  42 +// if(error){
  43 +// if(error.code == 10000){
  44 +// //用户取消
  45 +// }else{
  46 +// [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];
  47 +// }
  48 +// return ;
  49 +// }
  50 +// if(userInfo.thirdPartyId&&![userInfo.thirdPartyId isEqualToString:@""]){
  51 +// // 发起绑定请求
  52 +// model.thirdPartyId = userInfo.thirdPartyId;
  53 +// [strongSelf sendBindingModel:model block:block];
  54 +//
  55 +// }else{
  56 +// [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];
  57 +//
  58 +// }
  59 +//
  60 +// }];
56 61
57 } 62 }
58 63
59 -+ (void)sendBindingModel:(CNBindingManageModel *)model block:(CNBindingResponseBlock)block{  
60 - NSDictionary *params = @{  
61 - @"uid":CNUserShareModel.uid?CNUserShareModel.uid:@"",  
62 - @"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",  
63 - @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",  
64 - @"token":CNUserShareModel.token?CNUserShareModel.token:@"",  
65 - @"clientPlat":@"i"};  
66 - [CNLiveNetworking setAllowRequestDefaultArgument:YES];  
67 - [CNLiveNetworking setupShowDataResult:NO];  
68 -  
69 - __weak typeof(self) weakSelf = self;  
70 - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginBind3rdUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {  
71 - __strong typeof(weakSelf) strongSelf = weakSelf;  
72 - if(!strongSelf) return;  
73 -  
74 - if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {  
75 - //绑定,并更新本地数据  
76 - CNBindingManageModel *bindingModel = [strongSelf updateBindingModel:model isBinding:@"1"];  
77 - block?block(YES, bindingModel, YES):@"";  
78 - }  
79 - else if([responseObject isKindOfClass:[NSDictionary class]]) {  
80 - [QMUITips showWithText:responseObject[@"errorMessage"] inView:AppKeyWindow hideAfterDelay:1.5];  
81 - block?block(NO, nil, NO):@"";  
82 - }  
83 - else{  
84 - [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];  
85 - block?block(NO, nil, NO):@"";  
86 - }  
87 -  
88 - }]; 64 ++ (void)sendBindingModel:(CNLiveBindingManageModel *)model block:(CNLiveBindingResponseBlock)block{
  65 +// NSDictionary *params = @{
  66 +// @"uid":CNUserShareModel.uid?CNUserShareModel.uid:@"",
  67 +// @"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",
  68 +// @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",
  69 +// @"token":CNUserShareModel.token?CNUserShareModel.token:@"",
  70 +// @"clientPlat":@"i"};
  71 +// [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  72 +// [CNLiveNetworking setupShowDataResult:NO];
  73 +//
  74 +// __weak typeof(self) weakSelf = self;
  75 +// [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginBind3rdUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  76 +// __strong typeof(weakSelf) strongSelf = weakSelf;
  77 +// if(!strongSelf) return;
  78 +//
  79 +// if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
  80 +// //绑定,并更新本地数据
  81 +// CNBindingManageModel *bindingModel = [strongSelf updateBindingModel:model isBinding:@"1"];
  82 +// block?block(YES, bindingModel, YES):@"";
  83 +// }
  84 +// else if([responseObject isKindOfClass:[NSDictionary class]]) {
  85 +// [QMUITips showWithText:responseObject[@"errorMessage"] inView:AppKeyWindow hideAfterDelay:1.5];
  86 +// block?block(NO, nil, NO):@"";
  87 +// }
  88 +// else{
  89 +// [QMUITips showWithText:@"绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];
  90 +// block?block(NO, nil, NO):@"";
  91 +// }
  92 +//
  93 +// }];
89 } 94 }
90 95
91 //解除绑定操作 96 //解除绑定操作
92 -+ (void)requestUnBindingModel:(CNBindingManageModel *)model block:(CNBindingResponseBlock)block{  
93 - NSDictionary *params = @{  
94 - @"uid":CNUserShareModel.uid?CNUserShareModel.uid:@"",  
95 - @"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",  
96 - @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",  
97 - @"token":CNUserShareModel.token?CNUserShareModel.token:@"",  
98 - @"clientPlat":@"i"};  
99 -  
100 - [CNLiveNetworking setAllowRequestDefaultArgument:YES];  
101 - [CNLiveNetworking setupShowDataResult:NO];  
102 -  
103 - __weak typeof(self) weakSelf = self;  
104 - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginUnBind3rdUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {  
105 - __strong typeof(weakSelf) strongSelf = weakSelf;  
106 - if(!strongSelf) return;  
107 -  
108 - if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {  
109 - //解除绑定,并更新本地数据  
110 - CNBindingManageModel *unbindingModel = [strongSelf updateBindingModel:model isBinding:@"0"];  
111 - block?block(YES, unbindingModel, NO):@"";  
112 - }  
113 - else if ([responseObject isKindOfClass:[NSDictionary class]]) {  
114 - [QMUITips showWithText:responseObject[@"errorMessage"] inView:AppKeyWindow hideAfterDelay:1.5];  
115 - block?block(NO, nil, NO):@"";  
116 - }  
117 - else{  
118 - [QMUITips showWithText:@"解除绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];  
119 - block?block(NO, nil, NO):@"";  
120 - }  
121 -  
122 - }]; 97 ++ (void)requestUnBindingModel:(CNLiveBindingManageModel *)model block:(CNLiveBindingResponseBlock)block{
  98 +// NSDictionary *params = @{
  99 +// @"uid":CNUserShareModel.uid?CNUserShareModel.uid:@"",
  100 +// @"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",
  101 +// @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",
  102 +// @"token":CNUserShareModel.token?CNUserShareModel.token:@"",
  103 +// @"clientPlat":@"i"};
  104 +//
  105 +// [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  106 +// [CNLiveNetworking setupShowDataResult:NO];
  107 +//
  108 +// __weak typeof(self) weakSelf = self;
  109 +// [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginUnBind3rdUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  110 +// __strong typeof(weakSelf) strongSelf = weakSelf;
  111 +// if(!strongSelf) return;
  112 +//
  113 +// if ([responseObject isKindOfClass:[NSDictionary class]] && [responseObject[@"errorCode"] isEqualToString:@"0"]) {
  114 +// //解除绑定,并更新本地数据
  115 +// CNBindingManageModel *unbindingModel = [strongSelf updateBindingModel:model isBinding:@"0"];
  116 +// block?block(YES, unbindingModel, NO):@"";
  117 +// }
  118 +// else if ([responseObject isKindOfClass:[NSDictionary class]]) {
  119 +// [QMUITips showWithText:responseObject[@"errorMessage"] inView:AppKeyWindow hideAfterDelay:1.5];
  120 +// block?block(NO, nil, NO):@"";
  121 +// }
  122 +// else{
  123 +// [QMUITips showWithText:@"解除绑定失败" inView:AppKeyWindow hideAfterDelay:1.5];
  124 +// block?block(NO, nil, NO):@"";
  125 +// }
  126 +//
  127 +// }];
123 128
124 } 129 }
125 130
126 //改变绑定数据 131 //改变绑定数据
127 -+ (CNBindingManageModel *)updateBindingModel:(CNBindingManageModel *)model isBinding:(NSString *)isBinding{ 132 ++ (CNLiveBindingManageModel *)updateBindingModel:(CNLiveBindingManageModel *)model isBinding:(NSString *)isBinding{
128 if([isBinding isEqualToString:@"0"]){ 133 if([isBinding isEqualToString:@"0"]){
129 //解除绑定 134 //解除绑定
130 model.isBinding = @"0"; 135 model.isBinding = @"0";
@@ -148,7 +153,7 @@ @@ -148,7 +153,7 @@
148 CNUserShareModel.appleUid = @""; 153 CNUserShareModel.appleUid = @"";
149 154
150 } 155 }
151 - [QMUITips showWithText:@"解除绑定成功" inView:AppKeyWindow hideAfterDelay:1.5]; 156 + [QMUITips showWithText:@"解除绑定成功" inView:([UIApplication sharedApplication].delegate).window hideAfterDelay:1.5];
152 return model; 157 return model;
153 } 158 }
154 else if ([isBinding isEqualToString:@"1"]){ 159 else if ([isBinding isEqualToString:@"1"]){
@@ -174,7 +179,7 @@ @@ -174,7 +179,7 @@
174 CNUserShareModel.appleUid = model.thirdPartyId; 179 CNUserShareModel.appleUid = model.thirdPartyId;
175 180
176 } 181 }
177 - [QMUITips showWithText:@"绑定成功" inView:AppKeyWindow hideAfterDelay:1.5]; 182 + [QMUITips showWithText:@"绑定成功" inView:([UIApplication sharedApplication].delegate).window hideAfterDelay:1.5];
178 return model; 183 return model;
179 184
180 } 185 }
@@ -183,10 +188,10 @@ @@ -183,10 +188,10 @@
183 } 188 }
184 189
185 //请求绑定数据 190 //请求绑定数据
186 -+ (void)requestModels:(CNBindingArrayBlock)block{ 191 ++ (void)requestModels:(CNLiveBindingArrayBlock)block{
187 NSMutableArray *bindingData = [[NSMutableArray alloc] init]; 192 NSMutableArray *bindingData = [[NSMutableArray alloc] init];
188 NSMutableArray *unBindingData = [[NSMutableArray alloc] init]; 193 NSMutableArray *unBindingData = [[NSMutableArray alloc] init];
189 - CNBindingManageModel *tmodel = [[CNBindingManageModel alloc]init]; 194 + CNLiveBindingManageModel *tmodel = [[CNLiveBindingManageModel alloc]init];
190 tmodel.title = @"手机号"; 195 tmodel.title = @"手机号";
191 tmodel.image = @"login_telephone"; 196 tmodel.image = @"login_telephone";
192 NSString *mobile = [CNUserShareModel.mobile stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"]; 197 NSString *mobile = [CNUserShareModel.mobile stringByReplacingCharactersInRange:NSMakeRange(3, 4) withString:@"****"];
@@ -196,7 +201,7 @@ @@ -196,7 +201,7 @@
196 tmodel.thirdPartyId = CNUserShareModel.uid; 201 tmodel.thirdPartyId = CNUserShareModel.uid;
197 [bindingData addObject:tmodel]; 202 [bindingData addObject:tmodel];
198 203
199 - CNBindingManageModel *wmodel = [[CNBindingManageModel alloc]init]; 204 + CNLiveBindingManageModel *wmodel = [[CNLiveBindingManageModel alloc]init];
200 wmodel.title = @"微信"; 205 wmodel.title = @"微信";
201 wmodel.image = @"login_wechat"; 206 wmodel.image = @"login_wechat";
202 wmodel.thirdPartyPlat = @"3"; 207 wmodel.thirdPartyPlat = @"3";
@@ -211,7 +216,7 @@ @@ -211,7 +216,7 @@
211 } 216 }
212 [unBindingData addObject:wmodel]; 217 [unBindingData addObject:wmodel];
213 218
214 - CNBindingManageModel *qmodel = [[CNBindingManageModel alloc]init]; 219 + CNLiveBindingManageModel *qmodel = [[CNLiveBindingManageModel alloc]init];
215 qmodel.title = @"QQ"; 220 qmodel.title = @"QQ";
216 qmodel.image = @"login_qq"; 221 qmodel.image = @"login_qq";
217 qmodel.thirdPartyPlat = @"2"; 222 qmodel.thirdPartyPlat = @"2";
@@ -225,7 +230,7 @@ @@ -225,7 +230,7 @@
225 } 230 }
226 [unBindingData addObject:qmodel]; 231 [unBindingData addObject:qmodel];
227 232
228 - CNBindingManageModel *smodel = [[CNBindingManageModel alloc]init]; 233 + CNLiveBindingManageModel *smodel = [[CNLiveBindingManageModel alloc]init];
229 smodel.title = @"微博"; 234 smodel.title = @"微博";
230 smodel.image = @"login_weibo"; 235 smodel.image = @"login_weibo";
231 smodel.thirdPartyPlat = @"1"; 236 smodel.thirdPartyPlat = @"1";
@@ -239,7 +244,7 @@ @@ -239,7 +244,7 @@
239 } 244 }
240 [unBindingData addObject:smodel]; 245 [unBindingData addObject:smodel];
241 246
242 - CNBindingManageModel *amodel = [[CNBindingManageModel alloc]init]; 247 + CNLiveBindingManageModel *amodel = [[CNLiveBindingManageModel alloc]init];
243 amodel.title = @"苹果账号"; 248 amodel.title = @"苹果账号";
244 amodel.image = @"login_apple_icon"; 249 amodel.image = @"login_apple_icon";
245 amodel.thirdPartyPlat = @"5"; 250 amodel.thirdPartyPlat = @"5";
@@ -257,20 +262,20 @@ @@ -257,20 +262,20 @@
257 } 262 }
258 263
259 //三方登录 264 //三方登录
260 -+ (void)thirdPartyLoginWithType:(CNLiveSendAuthResp)type model:(CNThreeLoginModel *)model block:(CNLoginResponseBlock)block{  
261 - NSDictionary *params = @{@"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",  
262 - @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",  
263 - @"frmId":model.frmId?model.frmId:@"",  
264 - @"clientPlat":@"i"};  
265 - [CNLiveNetworking setAllowRequestDefaultArgument:YES];  
266 - [CNLiveNetworking setupShowDataResult:NO];  
267 -  
268 - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginIn3rdForWJJUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {  
269 - block?block(requestTask, responseObject, error):@"";  
270 -  
271 - }];  
272 -  
273 -  
274 -} 265 +//+ (void)thirdPartyLoginWithType:(CNLiveSendAuthResp)type model:(CNThreeLoginModel *)model block:(CNLoginResponseBlock)block{
  266 +// NSDictionary *params = @{@"thirdPartyPlat":model.thirdPartyPlat?model.thirdPartyPlat:@"",
  267 +// @"thirdPartyId":model.thirdPartyId?model.thirdPartyId:@"",
  268 +// @"frmId":model.frmId?model.frmId:@"",
  269 +// @"clientPlat":@"i"};
  270 +// [CNLiveNetworking setAllowRequestDefaultArgument:YES];
  271 +// [CNLiveNetworking setupShowDataResult:NO];
  272 +//
  273 +// [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodPOST URLString:CNLoginIn3rdForWJJUrl Param:params CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  274 +// block?block(requestTask, responseObject, error):@"";
  275 +//
  276 +// }];
  277 +//
  278 +//
  279 +//}
275 280
276 @end 281 @end
CNLiveLoginModule/Classes/Controller/CNLiveLoginController.m
@@ -15,6 +15,7 @@ @@ -15,6 +15,7 @@
15 #import "CNLiveUserAgreementManager.h" 15 #import "CNLiveUserAgreementManager.h"
16 #import "CNLiveCategory.h" 16 #import "CNLiveCategory.h"
17 #import "CNUserInfoManager.h" 17 #import "CNUserInfoManager.h"
  18 +#import "CNLiveEnvironment.h"
18 19
19 #import "CNLiveLoginView.h" 20 #import "CNLiveLoginView.h"
20 #import "CNLiveThreeLoginView.h" 21 #import "CNLiveThreeLoginView.h"
@@ -66,11 +67,12 @@ @@ -66,11 +67,12 @@
66 text.color = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0]; 67 text.color = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];
67 text.font = [UIFont systemFontOfSize:14.0]; 68 text.font = [UIFont systemFontOfSize:14.0];
68 __weak typeof(self) weakSelf = self; 69 __weak typeof(self) weakSelf = self;
69 - [text setTextHighlightRange:NSMakeRange(11, 4) color:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { 70 + UIColor *color = Business?[UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0]:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0];
  71 + [text setTextHighlightRange:NSMakeRange(11, 4) color:color backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
70 [weakSelf.view endEditing:YES]; 72 [weakSelf.view endEditing:YES];
71 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementUser]; 73 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementUser];
72 }]; 74 }];
73 - [text setTextHighlightRange:NSMakeRange(text.length-5, 4) color:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { 75 + [text setTextHighlightRange:NSMakeRange(text.length-5, 4) color:color backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
74 [weakSelf.view endEditing:YES]; 76 [weakSelf.view endEditing:YES];
75 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementPrivacy]; 77 [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementPrivacy];
76 }]; 78 }];
CNLiveLoginModule/Classes/ThreeLogin/CNLiveBindingTelController.m
@@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
11 #import "YYKit.h" 11 #import "YYKit.h"
12 #import "NSAttributedString+YYText.h" 12 #import "NSAttributedString+YYText.h"
13 #import "QMUIKit.h" 13 #import "QMUIKit.h"
  14 +#import "CNLiveEnvironment.h"
  15 +#import "CNLiveUserAgreementManager.h"
14 16
15 #import "CNLiveNavigationBar.h" 17 #import "CNLiveNavigationBar.h"
16 #import "CNLiveBindingTelView.h" 18 #import "CNLiveBindingTelView.h"
@@ -109,11 +111,12 @@ @@ -109,11 +111,12 @@
109 text.color = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0]; 111 text.color = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];
110 text.font = [UIFont systemFontOfSize:14.0]; 112 text.font = [UIFont systemFontOfSize:14.0];
111 __weak typeof(self) weakSelf = self; 113 __weak typeof(self) weakSelf = self;
112 - [text setTextHighlightRange:NSMakeRange(7, 12) color:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0] backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) { 114 + UIColor *color = Business?[UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0]:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0];
  115 + [text setTextHighlightRange:NSMakeRange(7, 12) color:color backgroundColor:[UIColor clearColor] tapAction:^(UIView * _Nonnull containerView, NSAttributedString * _Nonnull text, NSRange range, CGRect rect) {
113 __strong typeof(weakSelf) strongSelf = weakSelf; 116 __strong typeof(weakSelf) strongSelf = weakSelf;
114 if(!strongSelf) return; 117 if(!strongSelf) return;
115 [strongSelf.view endEditing:YES]; 118 [strongSelf.view endEditing:YES];
116 - // [XWAgreementManager jumpToAgreementH5WithType:XWAgreementTypeBindingLogin]; 119 + [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementUser];
117 120
118 }]; 121 }];
119 _protocol.attributedText = text; 122 _protocol.attributedText = text;
CNLiveLoginModule/Classes/ThreeLogin/CNLiveBindingTelView.m
@@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
10 #import "YYKit.h" 10 #import "YYKit.h"
11 #import "QMUIKit.h" 11 #import "QMUIKit.h"
12 #import "CNLiveCategory.h" 12 #import "CNLiveCategory.h"
  13 +#import "CNLiveEnvironment.h"
13 14
14 #import "CNLiveLoginCountryView.h" 15 #import "CNLiveLoginCountryView.h"
15 #import "CNLiveLoginTextField.h" 16 #import "CNLiveLoginTextField.h"
@@ -79,7 +80,7 @@ static const NSInteger timeValue = 1.5; @@ -79,7 +80,7 @@ static const NSInteger timeValue = 1.5;
79 countDown.dataSource = self; 80 countDown.dataSource = self;
80 countDown.delegate = self; 81 countDown.delegate = self;
81 countDown.frame = CGRectMake(frame.size.width-80, account.bottom+space+10, 80, rowHeight-10); 82 countDown.frame = CGRectMake(frame.size.width-80, account.bottom+space+10, 80, rowHeight-10);
82 - UIImage *image2 = [self getImageWithImageName:@"login_get_code" bundleName:@"CNLiveLoginModule" targetClass:[self class]]; 83 + UIImage *image2 = [self getImageWithImageName:Business?@"login_get_code_b":@"login_get_code" bundleName:@"CNLiveLoginModule" targetClass:[self class]];
83 [countDown setImage:image2 forState:UIControlStateNormal]; 84 [countDown setImage:image2 forState:UIControlStateNormal];
84 countDown.adjustsImageWhenHighlighted = NO; 85 countDown.adjustsImageWhenHighlighted = NO;
85 [countDown setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 86 [countDown setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
@@ -94,7 +95,8 @@ static const NSInteger timeValue = 1.5; @@ -94,7 +95,8 @@ static const NSInteger timeValue = 1.5;
94 [binding setTitle:@"确认手机绑定并同意协议" forState:UIControlStateNormal]; 95 [binding setTitle:@"确认手机绑定并同意协议" forState:UIControlStateNormal];
95 [binding setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 96 [binding setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
96 binding.titleLabel.font = [UIFont systemFontOfSize:15.0]; 97 binding.titleLabel.font = [UIFont systemFontOfSize:15.0];
97 - binding.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; 98 + UIColor *color = Business?[UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0]:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0];
  99 + binding.backgroundColor = color;
98 binding.layer.cornerRadius = 20; 100 binding.layer.cornerRadius = 20;
99 binding.layer.masksToBounds = YES; 101 binding.layer.masksToBounds = YES;
100 binding.adjustsImageWhenHighlighted = NO; 102 binding.adjustsImageWhenHighlighted = NO;
@@ -108,7 +110,6 @@ static const NSInteger timeValue = 1.5; @@ -108,7 +110,6 @@ static const NSInteger timeValue = 1.5;
108 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{ 110 - (BOOL)textFieldShouldBeginEditing:(UITextField *)textField{
109 if ([textField isEqual:_account] || [textField isEqual:_code]) { 111 if ([textField isEqual:_account] || [textField isEqual:_code]) {
110 return YES; 112 return YES;
111 -  
112 } 113 }
113 else { 114 else {
114 return YES; 115 return YES;
CNLiveLoginModule/Classes/ThreeLogin/CNLiveThreeLoginView.h
@@ -7,13 +7,13 @@ @@ -7,13 +7,13 @@
7 // 7 //
8 8
9 #import <UIKit/UIKit.h> 9 #import <UIKit/UIKit.h>
10 -#import "CNLiveShareImageManager.h" 10 +//#import "CNLiveShareImageManager.h"
11 11
12 NS_ASSUME_NONNULL_BEGIN 12 NS_ASSUME_NONNULL_BEGIN
13 13
14 @class CNLiveThreeLoginView; 14 @class CNLiveThreeLoginView;
15 @protocol CNLiveThreeLoginViewDelegate <NSObject> 15 @protocol CNLiveThreeLoginViewDelegate <NSObject>
16 -- (void)clickedButton:(CNLiveThreeLoginView *)view type:(CNLiveSendAuthResp)type; 16 +//- (void)clickedButton:(CNLiveThreeLoginView *)view type:(CNLiveSendAuthResp)type;
17 17
18 @end 18 @end
19 @interface CNLiveThreeLoginView : UIView 19 @interface CNLiveThreeLoginView : UIView
CNLiveLoginModule/Classes/ThreeLogin/CNLiveThreeLoginView.m
@@ -9,106 +9,106 @@ @@ -9,106 +9,106 @@
9 #import "CNLiveThreeLoginView.h" 9 #import "CNLiveThreeLoginView.h"
10 #import "YYKit.h" 10 #import "YYKit.h"
11 #import "CNLiveCategory.h" 11 #import "CNLiveCategory.h"
12 -#import "CNLiveShareManager.h"  
13 -#import "WXApi.h" 12 +//#import "CNLiveShareManager.h"
  13 +//#import "WXApi.h"
14 14
15 @interface CNLiveThreeLoginView() 15 @interface CNLiveThreeLoginView()
16 16
17 @end 17 @end
18 @implementation CNLiveThreeLoginView 18 @implementation CNLiveThreeLoginView
19 static NSInteger const rowHeight = 60; 19 static NSInteger const rowHeight = 60;
20 -- (instancetype)initWithFrame:(CGRect)frame{  
21 - self = [super initWithFrame:frame];  
22 - if (self) {  
23 - [self createSubviews:frame];  
24 -  
25 - }  
26 - return self;  
27 -  
28 -}  
29 -- (void)createSubviews:(CGRect)frame{  
30 - CGFloat width = frame.size.width;  
31 - CGFloat nameWidth = width/3.0;  
32 - CGFloat lineLeft = 15;  
33 - CGFloat lineWidth = nameWidth - lineLeft*2;  
34 -  
35 - UIView *leftLine = [[UIView alloc] initWithFrame:CGRectMake(lineLeft, (rowHeight/3.0-1)/2.0, lineWidth, 1)];  
36 - leftLine.backgroundColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];  
37 - [self addSubview:leftLine];  
38 -  
39 - UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(nameWidth, 0, nameWidth, rowHeight/3.0)];  
40 - name.textColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];  
41 - name.font = [UIFont systemFontOfSize:14];  
42 - name.textAlignment = NSTextAlignmentCenter;  
43 - name.text = @"第三方账号登录";  
44 - [self addSubview:name];  
45 -  
46 - UILabel *rightLine = [[UILabel alloc] initWithFrame:CGRectMake(name.right+15, leftLine.top, leftLine.width, 1)];  
47 - rightLine.backgroundColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];  
48 - [self addSubview:rightLine];  
49 -  
50 - NSMutableArray *pics = [NSMutableArray arrayWithArray:@[@"login_qq",@"login_weibo"]];  
51 - if([WXApi isWXAppInstalled]||[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]]){  
52 - [pics insertObject:@"login_wechat" atIndex:0];  
53 - }  
54 - NSUInteger number = pics.count;  
55 - if (@available(iOS 13, *)) {  
56 - [pics addObject:@"login_apple"];  
57 - number = pics.count + 1;  
58 - }  
59 - CGFloat btnWidth = width/number*1.0;  
60 -  
61 - for(int i = 0; i < pics.count; i++){  
62 - UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];  
63 - btn.tag = 10000+i;  
64 - btn.frame = CGRectMake(btnWidth*i, name.bottom, btnWidth, rowHeight);  
65 - if (@available(iOS 13, *)) {  
66 - if (i == pics.count-1) {  
67 - btn.frame = CGRectMake(btnWidth*i, name.bottom, 2*btnWidth, rowHeight);  
68 - }  
69 - }  
70 - UIImage *image = [self getImageWithImageName:pics[i] bundleName:@"CNLiveLoginModule" targetClass:[self class]];  
71 - [btn setImage:image forState:UIControlStateNormal];  
72 - btn.adjustsImageWhenHighlighted = NO;  
73 - [btn addTarget:self action:@selector(btnDidClicked:) forControlEvents:UIControlEventTouchUpInside];  
74 - [self addSubview:btn];  
75 -  
76 - }  
77 -  
78 -}  
79 -- (void)btnDidClicked:(UIButton *)btn{  
80 - if([WXApi isWXAppInstalled]||[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]]){  
81 - if (self.delegate && [self.delegate respondsToSelector:@selector(clickedButton:type:)]) {  
82 - if(btn.tag == 10000){  
83 - [self.delegate clickedButton:self type:CNLiveSendAuthRespWX];  
84 -  
85 - }else if (btn.tag == 10001){  
86 - [self.delegate clickedButton:self type:CNLiveSendAuthRespQQ];  
87 -  
88 - }else if(btn.tag == 10002){  
89 - [self.delegate clickedButton:self type:CNLiveSendAuthRespWB];  
90 -  
91 - }else if(btn.tag == 10003){  
92 - [self.delegate clickedButton:self type:CNLiveSendAuthRespApple];  
93 -  
94 - }  
95 - }  
96 - }else{  
97 - if (self.delegate && [self.delegate respondsToSelector:@selector(clickedButton:type:)]) {  
98 - if(btn.tag == 10000){  
99 - [self.delegate clickedButton:self type:CNLiveSendAuthRespQQ];  
100 -  
101 - }else if(btn.tag == 10001){  
102 - [self.delegate clickedButton:self type:CNLiveSendAuthRespWB];  
103 -  
104 - }else if(btn.tag == 10002){  
105 - [self.delegate clickedButton:self type:CNLiveSendAuthRespApple];  
106 -  
107 - }  
108 - }  
109 - }  
110 -  
111 -} 20 +//- (instancetype)initWithFrame:(CGRect)frame{
  21 +// self = [super initWithFrame:frame];
  22 +// if (self) {
  23 +// [self createSubviews:frame];
  24 +//
  25 +// }
  26 +// return self;
  27 +//
  28 +//}
  29 +//- (void)createSubviews:(CGRect)frame{
  30 +// CGFloat width = frame.size.width;
  31 +// CGFloat nameWidth = width/3.0;
  32 +// CGFloat lineLeft = 15;
  33 +// CGFloat lineWidth = nameWidth - lineLeft*2;
  34 +//
  35 +// UIView *leftLine = [[UIView alloc] initWithFrame:CGRectMake(lineLeft, (rowHeight/3.0-1)/2.0, lineWidth, 1)];
  36 +// leftLine.backgroundColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];
  37 +// [self addSubview:leftLine];
  38 +//
  39 +// UILabel *name = [[UILabel alloc] initWithFrame:CGRectMake(nameWidth, 0, nameWidth, rowHeight/3.0)];
  40 +// name.textColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];
  41 +// name.font = [UIFont systemFontOfSize:14];
  42 +// name.textAlignment = NSTextAlignmentCenter;
  43 +// name.text = @"第三方账号登录";
  44 +// [self addSubview:name];
  45 +//
  46 +// UILabel *rightLine = [[UILabel alloc] initWithFrame:CGRectMake(name.right+15, leftLine.top, leftLine.width, 1)];
  47 +// rightLine.backgroundColor = [UIColor colorWithRed:173/255.0 green:173/255.0 blue:173/255.0 alpha:1.0];
  48 +// [self addSubview:rightLine];
  49 +//
  50 +// NSMutableArray *pics = [NSMutableArray arrayWithArray:@[@"login_qq",@"login_weibo"]];
  51 +// if([WXApi isWXAppInstalled]||[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]]){
  52 +// [pics insertObject:@"login_wechat" atIndex:0];
  53 +// }
  54 +// NSUInteger number = pics.count;
  55 +// if (@available(iOS 13, *)) {
  56 +// [pics addObject:@"login_apple"];
  57 +// number = pics.count + 1;
  58 +// }
  59 +// CGFloat btnWidth = width/number*1.0;
  60 +//
  61 +// for(int i = 0; i < pics.count; i++){
  62 +// UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
  63 +// btn.tag = 10000+i;
  64 +// btn.frame = CGRectMake(btnWidth*i, name.bottom, btnWidth, rowHeight);
  65 +// if (@available(iOS 13, *)) {
  66 +// if (i == pics.count-1) {
  67 +// btn.frame = CGRectMake(btnWidth*i, name.bottom, 2*btnWidth, rowHeight);
  68 +// }
  69 +// }
  70 +// UIImage *image = [self getImageWithImageName:pics[i] bundleName:@"CNLiveLoginModule" targetClass:[self class]];
  71 +// [btn setImage:image forState:UIControlStateNormal];
  72 +// btn.adjustsImageWhenHighlighted = NO;
  73 +// [btn addTarget:self action:@selector(btnDidClicked:) forControlEvents:UIControlEventTouchUpInside];
  74 +// [self addSubview:btn];
  75 +//
  76 +// }
  77 +//
  78 +//}
  79 +//- (void)btnDidClicked:(UIButton *)btn{
  80 +// if([WXApi isWXAppInstalled]||[[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"wechat://"]]){
  81 +// if (self.delegate && [self.delegate respondsToSelector:@selector(clickedButton:type:)]) {
  82 +// if(btn.tag == 10000){
  83 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespWX];
  84 +//
  85 +// }else if (btn.tag == 10001){
  86 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespQQ];
  87 +//
  88 +// }else if(btn.tag == 10002){
  89 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespWB];
  90 +//
  91 +// }else if(btn.tag == 10003){
  92 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespApple];
  93 +//
  94 +// }
  95 +// }
  96 +// }else{
  97 +// if (self.delegate && [self.delegate respondsToSelector:@selector(clickedButton:type:)]) {
  98 +// if(btn.tag == 10000){
  99 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespQQ];
  100 +//
  101 +// }else if(btn.tag == 10001){
  102 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespWB];
  103 +//
  104 +// }else if(btn.tag == 10002){
  105 +// [self.delegate clickedButton:self type:CNLiveSendAuthRespApple];
  106 +//
  107 +// }
  108 +// }
  109 +// }
  110 +//
  111 +//}
112 112
113 /* 113 /*
114 // Only override drawRect: if you perform custom drawing. 114 // Only override drawRect: if you perform custom drawing.
CNLiveLoginModule/Classes/View/CNLiveLoginView.m
@@ -63,7 +63,7 @@ static const NSInteger timeValue = 1.5; @@ -63,7 +63,7 @@ static const NSInteger timeValue = 1.5;
63 } 63 }
64 - (void)createSubviews:(CGRect)frame{ 64 - (void)createSubviews:(CGRect)frame{
65 UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((frame.size.width-75)/2.0, 0, 75, 100)]; 65 UIImageView *logo = [[UIImageView alloc] initWithFrame:CGRectMake((frame.size.width-75)/2.0, 0, 75, 100)];
66 - UIImage *image = [self getImageWithImageName:@"login_logo" bundleName:@"CNLiveLoginModule" targetClass:[self class]]; 66 + UIImage *image = [self getImageWithImageName:Business?@"login_logo_b":@"login_logo" bundleName:@"CNLiveLoginModule" targetClass:[self class]];
67 logo.image = image; 67 logo.image = image;
68 [self addSubview:logo]; 68 [self addSubview:logo];
69 self.logo = logo; 69 self.logo = logo;
@@ -103,7 +103,7 @@ static const NSInteger timeValue = 1.5; @@ -103,7 +103,7 @@ static const NSInteger timeValue = 1.5;
103 countDown.dataSource = self; 103 countDown.dataSource = self;
104 countDown.delegate = self; 104 countDown.delegate = self;
105 countDown.frame = CGRectMake(frame.size.width-80, account.bottom+space+10, 80, rowHeight-10); 105 countDown.frame = CGRectMake(frame.size.width-80, account.bottom+space+10, 80, rowHeight-10);
106 - UIImage *image2 = [self getImageWithImageName:@"login_get_code" bundleName:@"CNLiveLoginModule" targetClass:[self class]]; 106 + UIImage *image2 = [self getImageWithImageName:Business?@"login_get_code_b":@"login_get_code" bundleName:@"CNLiveLoginModule" targetClass:[self class]];
107 [countDown setImage:image2 forState:UIControlStateNormal]; 107 [countDown setImage:image2 forState:UIControlStateNormal];
108 countDown.adjustsImageWhenHighlighted = NO; 108 countDown.adjustsImageWhenHighlighted = NO;
109 [countDown setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 109 [countDown setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
@@ -126,7 +126,8 @@ static const NSInteger timeValue = 1.5; @@ -126,7 +126,8 @@ static const NSInteger timeValue = 1.5;
126 [login setTitle:@"登录" forState:UIControlStateNormal]; 126 [login setTitle:@"登录" forState:UIControlStateNormal];
127 [login setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; 127 [login setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
128 login.titleLabel.font = [UIFont systemFontOfSize:15.0]; 128 login.titleLabel.font = [UIFont systemFontOfSize:15.0];
129 - login.backgroundColor = [UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0]; 129 + UIColor *color = Business?[UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0]:[UIColor colorWithRed:35/255.0 green:212/255.0 blue:30/255.0 alpha:1.0];
  130 + login.backgroundColor = color;
130 login.layer.cornerRadius = 20; 131 login.layer.cornerRadius = 20;
131 login.layer.masksToBounds = YES; 132 login.layer.masksToBounds = YES;
132 login.adjustsImageWhenHighlighted = NO; 133 login.adjustsImageWhenHighlighted = NO;
Example/CNLiveLoginModule.xcodeproj/project.pbxproj
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 objects = { 7 objects = {
8 8
9 /* Begin PBXBuildFile section */ 9 /* Begin PBXBuildFile section */
10 - 189005ABD3FBFD70B45716F6 /* Pods_CNLiveLoginModule_Tests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F7C96919DD346F50DF8A1AAA /* Pods_CNLiveLoginModule_Tests.framework */; };  
11 43B0A716F319E6A31EEE1337 /* Pods_CNLiveLoginModule_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */; }; 10 43B0A716F319E6A31EEE1337 /* Pods_CNLiveLoginModule_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */; };
12 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; 11 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; };
13 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; 12 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; };
@@ -38,7 +37,6 @@ @@ -38,7 +37,6 @@
38 37
39 /* Begin PBXFileReference section */ 38 /* Begin PBXFileReference section */
40 11F04E11320E8360C5B3A0D7 /* Pods-CNLiveLoginModule_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example.release.xcconfig"; sourceTree = "<group>"; }; 39 11F04E11320E8360C5B3A0D7 /* Pods-CNLiveLoginModule_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Example.release.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example.release.xcconfig"; sourceTree = "<group>"; };
41 - 3457C6EFE3087351070CCD15 /* Pods-CNLiveLoginModule_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Tests.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Tests/Pods-CNLiveLoginModule_Tests.debug.xcconfig"; sourceTree = "<group>"; };  
42 4B28CE499406DB37965D8485 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; }; 40 4B28CE499406DB37965D8485 /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = "<group>"; };
43 6003F58A195388D20070C39A /* 登录模块.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "登录模块.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 41 6003F58A195388D20070C39A /* 登录模块.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "登录模块.app"; sourceTree = BUILT_PRODUCTS_DIR; };
44 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 42 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -65,8 +63,6 @@ @@ -65,8 +63,6 @@
65 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveLoginModule_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 63 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveLoginModule_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; };
66 A4A673B3F8A472F9BAB33C1C /* CNLiveLoginModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveLoginModule.podspec; path = ../CNLiveLoginModule.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 64 A4A673B3F8A472F9BAB33C1C /* CNLiveLoginModule.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = CNLiveLoginModule.podspec; path = ../CNLiveLoginModule.podspec; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
67 C494A15D22758133566EFE1A /* Pods-CNLiveLoginModule_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example.debug.xcconfig"; sourceTree = "<group>"; }; 65 C494A15D22758133566EFE1A /* Pods-CNLiveLoginModule_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Example.debug.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example.debug.xcconfig"; sourceTree = "<group>"; };
68 - E860C0C69E66BE81E9B35501 /* Pods-CNLiveLoginModule_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-CNLiveLoginModule_Tests.release.xcconfig"; path = "Target Support Files/Pods-CNLiveLoginModule_Tests/Pods-CNLiveLoginModule_Tests.release.xcconfig"; sourceTree = "<group>"; };  
69 - F7C96919DD346F50DF8A1AAA /* Pods_CNLiveLoginModule_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_CNLiveLoginModule_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; };  
70 /* End PBXFileReference section */ 66 /* End PBXFileReference section */
71 67
72 /* Begin PBXFrameworksBuildPhase section */ 68 /* Begin PBXFrameworksBuildPhase section */
@@ -88,7 +84,6 @@ @@ -88,7 +84,6 @@
88 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, 84 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */,
89 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, 85 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */,
90 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, 86 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */,
91 - 189005ABD3FBFD70B45716F6 /* Pods_CNLiveLoginModule_Tests.framework in Frameworks */,  
92 ); 87 );
93 runOnlyForDeploymentPostprocessing = 0; 88 runOnlyForDeploymentPostprocessing = 0;
94 }; 89 };
@@ -100,8 +95,6 @@ @@ -100,8 +95,6 @@
100 children = ( 95 children = (
101 C494A15D22758133566EFE1A /* Pods-CNLiveLoginModule_Example.debug.xcconfig */, 96 C494A15D22758133566EFE1A /* Pods-CNLiveLoginModule_Example.debug.xcconfig */,
102 11F04E11320E8360C5B3A0D7 /* Pods-CNLiveLoginModule_Example.release.xcconfig */, 97 11F04E11320E8360C5B3A0D7 /* Pods-CNLiveLoginModule_Example.release.xcconfig */,
103 - 3457C6EFE3087351070CCD15 /* Pods-CNLiveLoginModule_Tests.debug.xcconfig */,  
104 - E860C0C69E66BE81E9B35501 /* Pods-CNLiveLoginModule_Tests.release.xcconfig */,  
105 ); 98 );
106 path = Pods; 99 path = Pods;
107 sourceTree = "<group>"; 100 sourceTree = "<group>";
@@ -135,7 +128,6 @@ @@ -135,7 +128,6 @@
135 6003F591195388D20070C39A /* UIKit.framework */, 128 6003F591195388D20070C39A /* UIKit.framework */,
136 6003F5AF195388D20070C39A /* XCTest.framework */, 129 6003F5AF195388D20070C39A /* XCTest.framework */,
137 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */, 130 9F12ACEE9993DD0CAD05BA1B /* Pods_CNLiveLoginModule_Example.framework */,
138 - F7C96919DD346F50DF8A1AAA /* Pods_CNLiveLoginModule_Tests.framework */,  
139 ); 131 );
140 name = Frameworks; 132 name = Frameworks;
141 sourceTree = "<group>"; 133 sourceTree = "<group>";
@@ -207,8 +199,8 @@ @@ -207,8 +199,8 @@
207 6003F586195388D20070C39A /* Sources */, 199 6003F586195388D20070C39A /* Sources */,
208 6003F587195388D20070C39A /* Frameworks */, 200 6003F587195388D20070C39A /* Frameworks */,
209 6003F588195388D20070C39A /* Resources */, 201 6003F588195388D20070C39A /* Resources */,
210 - 057461B17BCCE0389584B0ED /* [CP] Embed Pods Frameworks */,  
211 - 2A7FDE4BAF3533B61B4D4BF2 /* [CP] Copy Pods Resources */, 202 + 44B31241C1F55E9F61B32BA2 /* [CP] Embed Pods Frameworks */,
  203 + 00C9B333E974D90048CC8A26 /* [CP] Copy Pods Resources */,
212 ); 204 );
213 buildRules = ( 205 buildRules = (
214 ); 206 );
@@ -223,7 +215,6 @@ @@ -223,7 +215,6 @@
223 isa = PBXNativeTarget; 215 isa = PBXNativeTarget;
224 buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveLoginModule_Tests" */; 216 buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "CNLiveLoginModule_Tests" */;
225 buildPhases = ( 217 buildPhases = (
226 - 479B71CB631FBB2745B895A0 /* [CP] Check Pods Manifest.lock */,  
227 6003F5AA195388D20070C39A /* Sources */, 218 6003F5AA195388D20070C39A /* Sources */,
228 6003F5AB195388D20070C39A /* Frameworks */, 219 6003F5AB195388D20070C39A /* Frameworks */,
229 6003F5AC195388D20070C39A /* Resources */, 220 6003F5AC195388D20070C39A /* Resources */,
@@ -299,7 +290,25 @@ @@ -299,7 +290,25 @@
299 /* End PBXResourcesBuildPhase section */ 290 /* End PBXResourcesBuildPhase section */
300 291
301 /* Begin PBXShellScriptBuildPhase section */ 292 /* Begin PBXShellScriptBuildPhase section */
302 - 057461B17BCCE0389584B0ED /* [CP] Embed Pods Frameworks */ = { 293 + 00C9B333E974D90048CC8A26 /* [CP] Copy Pods Resources */ = {
  294 + isa = PBXShellScriptBuildPhase;
  295 + buildActionMask = 2147483647;
  296 + files = (
  297 + );
  298 + inputPaths = (
  299 + "${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-resources.sh",
  300 + "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveLoginModule/CNLiveLoginModule.bundle",
  301 + );
  302 + name = "[CP] Copy Pods Resources";
  303 + outputPaths = (
  304 + "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveLoginModule.bundle",
  305 + );
  306 + runOnlyForDeploymentPostprocessing = 0;
  307 + shellPath = /bin/sh;
  308 + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-resources.sh\"\n";
  309 + showEnvVarsInLog = 0;
  310 + };
  311 + 44B31241C1F55E9F61B32BA2 /* [CP] Embed Pods Frameworks */ = {
303 isa = PBXShellScriptBuildPhase; 312 isa = PBXShellScriptBuildPhase;
304 buildActionMask = 2147483647; 313 buildActionMask = 2147483647;
305 files = ( 314 files = (
@@ -312,6 +321,7 @@ @@ -312,6 +321,7 @@
312 "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework", 321 "${BUILT_PRODUCTS_DIR}/CNLiveBaseKit/CNLiveBaseKit.framework",
313 "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework", 322 "${BUILT_PRODUCTS_DIR}/CNLiveBaseTools/CNLiveBaseTools.framework",
314 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework", 323 "${BUILT_PRODUCTS_DIR}/CNLiveBeeHive/CNLiveBeeHive.framework",
  324 + "${BUILT_PRODUCTS_DIR}/CNLiveBusinessBaseModule/CNLiveBusinessBaseModule.framework",
315 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework", 325 "${BUILT_PRODUCTS_DIR}/CNLiveBusinessTools/CNLiveBusinessTools.framework",
316 "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework", 326 "${BUILT_PRODUCTS_DIR}/CNLiveCacheManagerKit/CNLiveCacheManagerKit.framework",
317 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework", 327 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
@@ -346,6 +356,7 @@ @@ -346,6 +356,7 @@
346 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework", 356 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseKit.framework",
347 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework", 357 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseTools.framework",
348 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework", 358 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBeeHive.framework",
  359 + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessBaseModule.framework",
349 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework", 360 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBusinessTools.framework",
350 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework", 361 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCacheManagerKit.framework",
351 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework", 362 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
@@ -377,50 +388,6 @@ @@ -377,50 +388,6 @@
377 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-frameworks.sh\"\n"; 388 shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-frameworks.sh\"\n";
378 showEnvVarsInLog = 0; 389 showEnvVarsInLog = 0;
379 }; 390 };
380 - 2A7FDE4BAF3533B61B4D4BF2 /* [CP] Copy Pods Resources */ = {  
381 - isa = PBXShellScriptBuildPhase;  
382 - buildActionMask = 2147483647;  
383 - files = (  
384 - );  
385 - inputPaths = (  
386 - "${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-resources.sh",  
387 - "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveLoginModule/CNLiveLoginModule.bundle",  
388 - "${PODS_CONFIGURATION_BUILD_DIR}/CNLiveShareToolKit/CNLiveShareToolKit.bundle",  
389 - "${PODS_ROOT}/WeiboSDK/libWeiboSDK/WeiboSDK.bundle",  
390 - );  
391 - name = "[CP] Copy Pods Resources";  
392 - outputPaths = (  
393 - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveLoginModule.bundle",  
394 - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/CNLiveShareToolKit.bundle",  
395 - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WeiboSDK.bundle",  
396 - );  
397 - runOnlyForDeploymentPostprocessing = 0;  
398 - shellPath = /bin/sh;  
399 - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-CNLiveLoginModule_Example/Pods-CNLiveLoginModule_Example-resources.sh\"\n";  
400 - showEnvVarsInLog = 0;  
401 - };  
402 - 479B71CB631FBB2745B895A0 /* [CP] Check Pods Manifest.lock */ = {  
403 - isa = PBXShellScriptBuildPhase;  
404 - buildActionMask = 2147483647;  
405 - files = (  
406 - );  
407 - inputFileListPaths = (  
408 - );  
409 - inputPaths = (  
410 - "${PODS_PODFILE_DIR_PATH}/Podfile.lock",  
411 - "${PODS_ROOT}/Manifest.lock",  
412 - );  
413 - name = "[CP] Check Pods Manifest.lock";  
414 - outputFileListPaths = (  
415 - );  
416 - outputPaths = (  
417 - "$(DERIVED_FILE_DIR)/Pods-CNLiveLoginModule_Tests-checkManifestLockResult.txt",  
418 - );  
419 - runOnlyForDeploymentPostprocessing = 0;  
420 - shellPath = /bin/sh;  
421 - shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";  
422 - showEnvVarsInLog = 0;  
423 - };  
424 C744CFA8914B761288845DE6 /* [CP] Check Pods Manifest.lock */ = { 391 C744CFA8914B761288845DE6 /* [CP] Check Pods Manifest.lock */ = {
425 isa = PBXShellScriptBuildPhase; 392 isa = PBXShellScriptBuildPhase;
426 buildActionMask = 2147483647; 393 buildActionMask = 2147483647;
@@ -615,7 +582,6 @@ @@ -615,7 +582,6 @@
615 }; 582 };
616 6003F5C3195388D20070C39A /* Debug */ = { 583 6003F5C3195388D20070C39A /* Debug */ = {
617 isa = XCBuildConfiguration; 584 isa = XCBuildConfiguration;
618 - baseConfigurationReference = 3457C6EFE3087351070CCD15 /* Pods-CNLiveLoginModule_Tests.debug.xcconfig */;  
619 buildSettings = { 585 buildSettings = {
620 BUNDLE_LOADER = "$(TEST_HOST)"; 586 BUNDLE_LOADER = "$(TEST_HOST)";
621 FRAMEWORK_SEARCH_PATHS = ( 587 FRAMEWORK_SEARCH_PATHS = (
@@ -640,7 +606,6 @@ @@ -640,7 +606,6 @@
640 }; 606 };
641 6003F5C4195388D20070C39A /* Release */ = { 607 6003F5C4195388D20070C39A /* Release */ = {
642 isa = XCBuildConfiguration; 608 isa = XCBuildConfiguration;
643 - baseConfigurationReference = E860C0C69E66BE81E9B35501 /* Pods-CNLiveLoginModule_Tests.release.xcconfig */;  
644 buildSettings = { 609 buildSettings = {
645 BUNDLE_LOADER = "$(TEST_HOST)"; 610 BUNDLE_LOADER = "$(TEST_HOST)";
646 FRAMEWORK_SEARCH_PATHS = ( 611 FRAMEWORK_SEARCH_PATHS = (
Example/CNLiveLoginModule/CNLIVEAppDelegate.m
@@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
22 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];//UIScreen mainScreen].bounds个人理解获取屏幕的硬件信息然后设置尺寸大小 22 self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];//UIScreen mainScreen].bounds个人理解获取屏幕的硬件信息然后设置尺寸大小
23 23
24 [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; 24 [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];
  25 + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBusiness];
25 [CNLiveUserSystemCenter setAppId:AppId appKey:APPKey appSecret:AppSecret isTestEnvironment:TestEnvironment]; 26 [CNLiveUserSystemCenter setAppId:AppId appKey:APPKey appSecret:AppSecret isTestEnvironment:TestEnvironment];
26 if ([CNUserShareManager isLogin]) { 27 if ([CNUserShareManager isLogin]) {
27 [CNLiveUserSystemCenter setUserId:CNUserShareModel.uid]; 28 [CNLiveUserSystemCenter setUserId:CNUserShareModel.uid];
Example/Podfile
@@ -6,23 +6,16 @@ platform :ios, &#39;9.0&#39; @@ -6,23 +6,16 @@ platform :ios, &#39;9.0&#39;
6 6
7 target 'CNLiveLoginModule_Example' do 7 target 'CNLiveLoginModule_Example' do
8 pod 'CNLiveLoginModule', :path => '../' 8 pod 'CNLiveLoginModule', :path => '../'
9 -  
10 - #依赖三方私有库,如果里面有.a的时候加上这个  
11 pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} 9 pre_install do |installer| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
12 end 10 end
13 - post_install do |installer_representation|  
14 - installer_representation.pods_project.targets.each do |target| 11 +
  12 + post_install do |installer|
  13 + installer.pods_project.targets.each do |target|
15 target.build_configurations.each do |config| 14 target.build_configurations.each do |config|
16 - #share使用pod库时,pod中包含[UIApplication sharedApplication]的代码,需要下面的配置  
17 - config.build_settings['APPLICATION_EXTENSION_API_ONLY'] = 'NO'  
18 - config.build_settings['ENABLE_BITCODE'] = false 15 + if config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'].to_f < 8.0
  16 + config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '8.0'
  17 + end
19 end 18 end
20 end 19 end
21 end 20 end
22 -  
23 - target 'CNLiveLoginModule_Tests' do  
24 - inherit! :search_paths  
25 -  
26 -  
27 - end  
28 end 21 end