Commit afd53bc82538cb95006bb310819cd7b2d80cc46e

Authored by iOS-Xiaowen
1 parent 24c6956c

no message

CNLiveUserAgreementManager.podspec
@@ -40,9 +40,6 @@ TODO: 网家家-用户协议管理类. @@ -40,9 +40,6 @@ TODO: 网家家-用户协议管理类.
40 # s.frameworks = 'UIKit', 'MapKit' 40 # s.frameworks = 'UIKit', 'MapKit'
41 s.dependency 'CNLiveTripartiteManagement/AFNetworking' 41 s.dependency 'CNLiveTripartiteManagement/AFNetworking'
42 42
43 - #环境库  
44 - s.dependency 'CNLiveEnvironment'  
45 -  
46 # 数据请求 43 # 数据请求
47 s.dependency 'CNLiveRequestBastKit' 44 s.dependency 'CNLiveRequestBastKit'
48 45
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementController.m
@@ -9,7 +9,6 @@ @@ -9,7 +9,6 @@
9 #import "CNLiveUserAgreementController.h" 9 #import "CNLiveUserAgreementController.h"
10 #import "WKWebViewJavascriptBridge.h" 10 #import "WKWebViewJavascriptBridge.h"
11 11
12 -#import "CNLiveEnvironment.h"  
13 #import "CNLiveWebView.h" 12 #import "CNLiveWebView.h"
14 13
15 @interface CNLiveUserAgreementController () 14 @interface CNLiveUserAgreementController ()
@@ -19,7 +18,7 @@ @@ -19,7 +18,7 @@
19 @implementation CNLiveUserAgreementController 18 @implementation CNLiveUserAgreementController
20 - (void)createSubViews { 19 - (void)createSubViews {
21 [super createSubViews]; 20 [super createSubViews];
22 - 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]; 21 + UIColor *color = [UIColor colorWithRed:72/255.0 green:168/255.0 blue:249/255.0 alpha:1.0];
23 self.webView.progressViewColor = color; 22 self.webView.progressViewColor = color;
24 } 23 }
25 #pragma mark - 交互 24 #pragma mark - 交互
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementManager.m
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 // 7 //
8 #import "CNLiveUserAgreementManager.h" 8 #import "CNLiveUserAgreementManager.h"
9 #import <CNLiveRequestBastKit/CNLiveNetworking.h> 9 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
10 -#import "CNLiveEnvironment.h"  
11 #import "CNLiveUserAgreementController.h" 10 #import "CNLiveUserAgreementController.h"
12 #import "CNLiveManager.h" 11 #import "CNLiveManager.h"
13 12
@@ -56,7 +55,7 @@ static CNLiveUserAgreementManager *_instance = nil; @@ -56,7 +55,7 @@ static CNLiveUserAgreementManager *_instance = nil;
56 */ 55 */
57 - (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure { 56 - (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure {
58 [CNLiveNetworking setAllowRequestDefaultArgument:NO]; 57 [CNLiveNetworking setAllowRequestDefaultArgument:NO];
59 - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNGetAgreementH5Url Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 58 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:@"https://wjj.ys1.cnliveimg.com/json/wjj_user_terms.json" Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
60 if (error) { 59 if (error) {
61 if (failure) { 60 if (failure) {
62 failure(error); 61 failure(error);
@@ -262,10 +261,7 @@ static CNLiveUserAgreementManager *_instance = nil; @@ -262,10 +261,7 @@ static CNLiveUserAgreementManager *_instance = nil;
262 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden]; 261 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden];
263 262
264 } failure:^(NSError *error) { 263 } failure:^(NSError *error) {
265 - if(TestEnvironment){  
266 - NSLog(@"点击协议跳转失败");  
267 -  
268 - } 264 + NSLog(@"点击协议跳转失败");
269 }]; 265 }];
270 266
271 } 267 }
@@ -283,10 +279,7 @@ static CNLiveUserAgreementManager *_instance = nil; @@ -283,10 +279,7 @@ static CNLiveUserAgreementManager *_instance = nil;
283 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden]; 279 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden];
284 280
285 } failure:^(NSError *error) { 281 } failure:^(NSError *error) {
286 - if(TestEnvironment){  
287 - NSLog(@"点击协议跳转失败");  
288 -  
289 - } 282 + NSLog(@"点击协议跳转失败");
290 }]; 283 }];
291 284
292 } 285 }
@@ -315,7 +308,7 @@ static CNLiveUserAgreementManager *_instance = nil; @@ -315,7 +308,7 @@ static CNLiveUserAgreementManager *_instance = nil;
315 */ 308 */
316 - (void)getAgreementH5WithString:(NSString *)string success:(SuccessBlock)success failure:(FailureBlock)failure{ 309 - (void)getAgreementH5WithString:(NSString *)string success:(SuccessBlock)success failure:(FailureBlock)failure{
317 [CNLiveNetworking setAllowRequestDefaultArgument:NO]; 310 [CNLiveNetworking setAllowRequestDefaultArgument:NO];
318 - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:CNGetAgreementH5Url Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) { 311 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:@"https://wjj.ys1.cnliveimg.com/json/wjj_user_terms.json" Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
319 if (!error) { 312 if (!error) {
320 if ([responseObject isKindOfClass:[NSArray class]]) { 313 if ([responseObject isKindOfClass:[NSArray class]]) {
321 for (NSDictionary *dic in responseObject) { 314 for (NSDictionary *dic in responseObject) {
Example/CNLiveUserAgreementManager.xcodeproj/project.pbxproj
@@ -328,7 +328,6 @@ @@ -328,7 +328,6 @@
328 "${BUILT_PRODUCTS_DIR}/CNLiveBaseClass/CNLiveBaseClass.framework", 328 "${BUILT_PRODUCTS_DIR}/CNLiveBaseClass/CNLiveBaseClass.framework",
329 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework", 329 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
330 "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework", 330 "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework",
331 - "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",  
332 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework", 331 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework",
333 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework", 332 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
334 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework", 333 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",
@@ -342,7 +341,6 @@ @@ -342,7 +341,6 @@
342 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseClass.framework", 341 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseClass.framework",
343 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework", 342 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
344 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework", 343 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework",
345 - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",  
346 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework", 344 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework",
347 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework", 345 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
348 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework", 346 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",
Example/CNLiveUserAgreementManager/CNLiveAppDelegate.m
@@ -8,13 +8,11 @@ @@ -8,13 +8,11 @@
8 8
9 #import "CNLiveAppDelegate.h" 9 #import "CNLiveAppDelegate.h"
10 #import "CNLiveViewController.h" 10 #import "CNLiveViewController.h"
11 -#import "CNLiveEnvironment.h"  
12 11
13 @implementation CNLiveAppDelegate 12 @implementation CNLiveAppDelegate
14 13
15 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 { 15 {
17 - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBusiness environmentType:CNLiveProductionAppStore];  
18 16
19 // Override point for customization after application launch. 17 // Override point for customization after application launch.
20 UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]]; 18 UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]];
Example/CNLiveUserAgreementManager/CNLiveViewController.m
@@ -7,7 +7,6 @@ @@ -7,7 +7,6 @@
7 // 7 //
8 8
9 #import "CNLiveViewController.h" 9 #import "CNLiveViewController.h"
10 -#import "CNLiveEnvironment.h"  
11 10
12 #import "CNLiveUserAgreementManager.h" 11 #import "CNLiveUserAgreementManager.h"
13 #import "CNLiveUserAgreementController.h" 12 #import "CNLiveUserAgreementController.h"
@@ -23,7 +22,6 @@ @@ -23,7 +22,6 @@
23 [super viewDidLoad]; 22 [super viewDidLoad];
24 // Do any additional setup after loading the view, typically from a nib. 23 // Do any additional setup after loading the view, typically from a nib.
25 24
26 - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];  
27 self.view.backgroundColor = [UIColor whiteColor]; 25 self.view.backgroundColor = [UIColor whiteColor];
28 UIButton *btn0 = [UIButton buttonWithType:UIButtonTypeCustom]; 26 UIButton *btn0 = [UIButton buttonWithType:UIButtonTypeCustom];
29 btn0.frame = CGRectMake(0, 0, 100, 100); 27 btn0.frame = CGRectMake(0, 0, 100, 100);