Commit d451b0f3632bbd0b6e7127d93067749aa5780c12
1 parent
80f706e3
接口调整
Showing
3 changed files
with
4 additions
and
2 deletions
LiveVideoCloud/AppDelegate/AppDelegate.m
| @@ -52,7 +52,7 @@ | @@ -52,7 +52,7 @@ | ||
| 52 | // 20170327 20170328 | 52 | // 20170327 20170328 |
| 53 | 53 | ||
| 54 | 54 | ||
| 55 | - CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170328l2" name:@"20170328" portrait:@""]; | 55 | + CNLiveChatUserInfo *userInfo = [[CNLiveChatUserInfo alloc] initWithUserId:@"20170328l3" name:@"20170328" portrait:@""]; |
| 56 | 56 | ||
| 57 | [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { | 57 | [[CNLiveChatManager sharedCNLiveChatManager] loginServer:userInfo success:^(NSString *userId) { |
| 58 | NSLog(@"连接服务器-----success"); | 58 | NSLog(@"连接服务器-----success"); |
LiveVideoCloud/Classes/Sections/UGCSections/Controller/LiveListService.m
| @@ -16,6 +16,7 @@ | @@ -16,6 +16,7 @@ | ||
| 16 | NSInteger time = [[NSDate date] timeIntervalSince1970]; | 16 | NSInteger time = [[NSDate date] timeIntervalSince1970]; |
| 17 | NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; | 17 | NSString *timeString = [NSString stringWithFormat:@"%ld", (long)time]; |
| 18 | NSMutableDictionary *parameter=[@{@"platform_id": [NSBundle mainBundle].bundleIdentifier, | 18 | NSMutableDictionary *parameter=[@{@"platform_id": [NSBundle mainBundle].bundleIdentifier, |
| 19 | + @"activityStatus": @"1,2", | ||
| 19 | @"timestamp": timeString, | 20 | @"timestamp": timeString, |
| 20 | @"appId": UserAppId} mutableCopy]; | 21 | @"appId": UserAppId} mutableCopy]; |
| 21 | NSString *string = [NSString stringWithFormat:@"%@&key=%@", [self sortParameters:parameter], UserAppKey]; | 22 | NSString *string = [NSString stringWithFormat:@"%@&key=%@", [self sortParameters:parameter], UserAppKey]; |
LiveVideoCloud/Classes/Sections/homeSections/Controller/LVCVodPlayerListController.m
| @@ -62,7 +62,8 @@ static NSString *vodCellId = @"vodCellId"; | @@ -62,7 +62,8 @@ static NSString *vodCellId = @"vodCellId"; | ||
| 62 | NSString *vodListURL = @"http://api.cnlive.com/open/api2/vod_epg/getVodListInfo4App"; | 62 | NSString *vodListURL = @"http://api.cnlive.com/open/api2/vod_epg/getVodListInfo4App"; |
| 63 | NSString *testVodListURL = @"http://test.open.cnlive.com/openapi/api2/vod_epg/getVodListInfo4App"; | 63 | NSString *testVodListURL = @"http://test.open.cnlive.com/openapi/api2/vod_epg/getVodListInfo4App"; |
| 64 | 64 | ||
| 65 | - [[AFHTTPRequestOperationManager manager] POST:testVodListURL parameters:parameter success:^(AFHTTPRequestOperation *operation, id responseObject) { | 65 | + NSString *url = appDelegate.isTestEnvironment ? testVodListURL : vodListURL; |
| 66 | + [[AFHTTPRequestOperationManager manager] POST:url parameters:parameter success:^(AFHTTPRequestOperation *operation, id responseObject) { | ||
| 66 | 67 | ||
| 67 | responseObject = [responseObject validatedDictionary]; | 68 | responseObject = [responseObject validatedDictionary]; |
| 68 | if ([responseObject[@"errorCode"] isEqualToString:@"0"]) { | 69 | if ([responseObject[@"errorCode"] isEqualToString:@"0"]) { |