Commit d44427c0a57b64aa0b56ea639a9cd4764d993a2f

Authored by yanglingyu
1 parent f781f313

0.4.8修改判断网络方法

CNLiveCMineModule.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 = 'CNLiveCMineModule' 10 s.name = 'CNLiveCMineModule'
11 - s.version = '0.4.7' 11 + s.version = '0.4.8'
12 s.summary = '网家家C端个人中心' 12 s.summary = '网家家C端个人中心'
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.
CNLiveCMineModule/Classes/CNCSubMine/View/CNMineSettingCell.m
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 7
8 #import "CNMineSettingCell.h" 8 #import "CNMineSettingCell.h"
9 9
10 -#define CNConnectSuccNotification @"CNConnectSuccNotification"  
11 @interface CNMineSettingCell () 10 @interface CNMineSettingCell ()
12 @property (nonatomic, strong) UILabel *titleLab; 11 @property (nonatomic, strong) UILabel *titleLab;
13 @property (nonatomic, strong) UIImageView *titleImg; 12 @property (nonatomic, strong) UIImageView *titleImg;
@@ -279,7 +278,7 @@ @@ -279,7 +278,7 @@
279 - (void)switchAction:(UISwitch *)sender { 278 - (void)switchAction:(UISwitch *)sender {
280 if (_model.cellType == SettingCellTypeSee) { //42 是否允许陌生人看生活圈 279 if (_model.cellType == SettingCellTypeSee) { //42 是否允许陌生人看生活圈
281 sender.userInteractionEnabled = NO; 280 sender.userInteractionEnabled = NO;
282 - if (![[[NSUserDefaults standardUserDefaults] objectForKey:CNConnectSuccNotification] boolValue]) { 281 + if (![CNLiveBusinessTools connectedToNetwork]) {
283 [sender setOn:[_model.status isEqualToString:@"access"]]; 282 [sender setOn:[_model.status isEqualToString:@"access"]];
284 sender.userInteractionEnabled = YES; 283 sender.userInteractionEnabled = YES;
285 return; 284 return;
CNLiveCMineModule/Classes/CNCSubMine/ViewController/CNMineCodeVC.m
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 7
8 #import "CNMineCodeVC.h" 8 #import "CNMineCodeVC.h"
9 9
10 -#define CNConnectSuccNotification @"CNConnectSuccNotification"  
11 #define kDefaultPicIcon(width) [UIImage qmui_imageWithColor:[UIColor qmui_colorWithHexString:@"#f2f2f2"] size:CGSizeMake(width, width) cornerRadius:0] 10 #define kDefaultPicIcon(width) [UIImage qmui_imageWithColor:[UIColor qmui_colorWithHexString:@"#f2f2f2"] size:CGSizeMake(width, width) cornerRadius:0]
12 #define OrderIdKey @"OrderIdKey" //订单号 11 #define OrderIdKey @"OrderIdKey" //订单号
13 @interface CNMineCodeVC () 12 @interface CNMineCodeVC ()
@@ -263,7 +262,7 @@ @@ -263,7 +262,7 @@
263 action1.buttonAttributes = cancelTitleAttributs; 262 action1.buttonAttributes = cancelTitleAttributs;
264 [alertController showWithAnimated:YES]; 263 [alertController showWithAnimated:YES];
265 } else if (status == PHAuthorizationStatusAuthorized) { // 用户允许访问相册 264 } else if (status == PHAuthorizationStatusAuthorized) { // 用户允许访问相册
266 - if (![[[NSUserDefaults standardUserDefaults] objectForKey:CNConnectSuccNotification] boolValue]) { 265 + if (![CNLiveBusinessTools connectedToNetwork]) {
267 [QMUITips showError:@"网络不给力" inView:AppKeyWindow hideAfterDelay:1.5]; 266 [QMUITips showError:@"网络不给力" inView:AppKeyWindow hideAfterDelay:1.5];
268 return; 267 return;
269 }; 268 };
CNLiveCMineModule/Classes/CNLiveCMineHeader.h
@@ -20,9 +20,6 @@ @@ -20,9 +20,6 @@
20 #define kCNLiveDefaultUserCircleIcon [UIImage cnlive_imageWithColor:[UIColor grayColor] size:CGSizeMake(60, 60) cornerRadius:0] 20 #define kCNLiveDefaultUserCircleIcon [UIImage cnlive_imageWithColor:[UIColor grayColor] size:CGSizeMake(60, 60) cornerRadius:0]
21 #endif 21 #endif
22 22
23 -#ifndef CNConnectSuccNotification  
24 -#define CNConnectSuccNotification @"CNConnectSuccNotification"  
25 -#endif  
26 #ifndef CNWjjUserTermsUrls 23 #ifndef CNWjjUserTermsUrls
27 #define CNWjjUserTermsUrls @"CNWjjUserTermsUrls" 24 #define CNWjjUserTermsUrls @"CNWjjUserTermsUrls"
28 #endif 25 #endif
CNLiveCMineModule/Classes/CNPrivacy/View/CNPrivacyTableViewCell.m
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 - (void)switchAction:(UISwitch *)sender { 82 - (void)switchAction:(UISwitch *)sender {
83 if (_model.cellType == CNPrivacyCellTypeSee) { //1 是否允许陌生人看生活圈 83 if (_model.cellType == CNPrivacyCellTypeSee) { //1 是否允许陌生人看生活圈
84 sender.userInteractionEnabled = NO; 84 sender.userInteractionEnabled = NO;
85 - if (![[[NSUserDefaults standardUserDefaults] objectForKey:CNConnectSuccNotification] boolValue]) { 85 + if (![CNLiveBusinessTools connectedToNetwork]) {
86 [sender setOn:[_model.status isEqualToString:@"access"]]; 86 [sender setOn:[_model.status isEqualToString:@"access"]];
87 sender.userInteractionEnabled = YES; 87 sender.userInteractionEnabled = YES;
88 return; 88 return;