Commit afd53bc82538cb95006bb310819cd7b2d80cc46e

Authored by iOS-Xiaowen
1 parent 24c6956c

no message

CNLiveUserAgreementManager.podspec
... ... @@ -40,9 +40,6 @@ TODO: 网家家-用户协议管理类.
40 40 # s.frameworks = 'UIKit', 'MapKit'
41 41 s.dependency 'CNLiveTripartiteManagement/AFNetworking'
42 42  
43   - #环境库
44   - s.dependency 'CNLiveEnvironment'
45   -
46 43 # 数据请求
47 44 s.dependency 'CNLiveRequestBastKit'
48 45  
... ...
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementController.m
... ... @@ -9,7 +9,6 @@
9 9 #import "CNLiveUserAgreementController.h"
10 10 #import "WKWebViewJavascriptBridge.h"
11 11  
12   -#import "CNLiveEnvironment.h"
13 12 #import "CNLiveWebView.h"
14 13  
15 14 @interface CNLiveUserAgreementController ()
... ... @@ -19,7 +18,7 @@
19 18 @implementation CNLiveUserAgreementController
20 19 - (void)createSubViews {
21 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 22 self.webView.progressViewColor = color;
24 23 }
25 24 #pragma mark - 交互
... ...
CNLiveUserAgreementManager/Classes/CNLiveUserAgreementManager.m
... ... @@ -7,7 +7,6 @@
7 7 //
8 8 #import "CNLiveUserAgreementManager.h"
9 9 #import <CNLiveRequestBastKit/CNLiveNetworking.h>
10   -#import "CNLiveEnvironment.h"
11 10 #import "CNLiveUserAgreementController.h"
12 11 #import "CNLiveManager.h"
13 12  
... ... @@ -56,7 +55,7 @@ static CNLiveUserAgreementManager *_instance = nil;
56 55 */
57 56 - (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure {
58 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 59 if (error) {
61 60 if (failure) {
62 61 failure(error);
... ... @@ -262,10 +261,7 @@ static CNLiveUserAgreementManager *_instance = nil;
262 261 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden];
263 262  
264 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 279 [strongSelf pushToWebControllerUrl:h5 name:title closeHidden:closeHidden];
284 280  
285 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 308 */
316 309 - (void)getAgreementH5WithString:(NSString *)string success:(SuccessBlock)success failure:(FailureBlock)failure{
317 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 312 if (!error) {
320 313 if ([responseObject isKindOfClass:[NSArray class]]) {
321 314 for (NSDictionary *dic in responseObject) {
... ...
Example/CNLiveUserAgreementManager.xcodeproj/project.pbxproj
... ... @@ -328,7 +328,6 @@
328 328 "${BUILT_PRODUCTS_DIR}/CNLiveBaseClass/CNLiveBaseClass.framework",
329 329 "${BUILT_PRODUCTS_DIR}/CNLiveCategory/CNLiveCategory.framework",
330 330 "${BUILT_PRODUCTS_DIR}/CNLiveCustomControl/CNLiveCustomControl.framework",
331   - "${BUILT_PRODUCTS_DIR}/CNLiveEnvironment/CNLiveEnvironment.framework",
332 331 "${BUILT_PRODUCTS_DIR}/CNLiveManager/CNLiveManager.framework",
333 332 "${BUILT_PRODUCTS_DIR}/CNLiveRequestBastKit/CNLiveRequestBastKit.framework",
334 333 "${BUILT_PRODUCTS_DIR}/CNLiveTripartiteManagement/CNLiveTripartiteManagement.framework",
... ... @@ -342,7 +341,6 @@
342 341 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveBaseClass.framework",
343 342 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCategory.framework",
344 343 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveCustomControl.framework",
345   - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveEnvironment.framework",
346 344 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveManager.framework",
347 345 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveRequestBastKit.framework",
348 346 "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CNLiveTripartiteManagement.framework",
... ...
Example/CNLiveUserAgreementManager/CNLiveAppDelegate.m
... ... @@ -8,13 +8,11 @@
8 8  
9 9 #import "CNLiveAppDelegate.h"
10 10 #import "CNLiveViewController.h"
11   -#import "CNLiveEnvironment.h"
12 11  
13 12 @implementation CNLiveAppDelegate
14 13  
15 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
16 15 {
17   - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBusiness environmentType:CNLiveProductionAppStore];
18 16  
19 17 // Override point for customization after application launch.
20 18 UINavigationController *navCtrl = [[UINavigationController alloc] initWithRootViewController:[CNLiveViewController new]];
... ...
Example/CNLiveUserAgreementManager/CNLiveViewController.m
... ... @@ -7,7 +7,6 @@
7 7 //
8 8  
9 9 #import "CNLiveViewController.h"
10   -#import "CNLiveEnvironment.h"
11 10  
12 11 #import "CNLiveUserAgreementManager.h"
13 12 #import "CNLiveUserAgreementController.h"
... ... @@ -23,7 +22,6 @@
23 22 [super viewDidLoad];
24 23 // Do any additional setup after loading the view, typically from a nib.
25 24  
26   - [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];
27 25 self.view.backgroundColor = [UIColor whiteColor];
28 26 UIButton *btn0 = [UIButton buttonWithType:UIButtonTypeCustom];
29 27 btn0.frame = CGRectMake(0, 0, 100, 100);
... ...