Commit 09f49703fde39de42288df2edda56751bc0201f6

Authored by 王军波
1 parent 66da9870

评论

LiveVideoCloud/AppDelegate/AppDelegate.m
@@ -29,7 +29,7 @@ @@ -29,7 +29,7 @@
29 [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:self.isTestEnvironment]; 29 [[CNLiveWebcastManager manager] initWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:self.isTestEnvironment];
30 30
31 // 初始化评论功能 31 // 初始化评论功能
32 - [[CNLiveCommentManager sharedCNLiveCommentManager] registerWithAppId:@"60_irn9cdak77" appKey:@"a425987ebc86e352b3373c25d5bd082d0cc248b4043028" isTestEnvironment:YES]; 32 + [[CNLiveCommentManager sharedCNLiveCommentManager] registerWithAppId:UserAppId appKey:UserAppKey isTestEnvironment:YES];
33 33
34 //初始化用户SDK 34 //初始化用户SDK
35 [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:self.isTestEnvironment]; 35 [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:self.isTestEnvironment];
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.h
@@ -12,6 +12,6 @@ @@ -12,6 +12,6 @@
12 @interface LVCTelevisionCell : UITableViewCell 12 @interface LVCTelevisionCell : UITableViewCell
13 13
14 @property (nonatomic, strong) LVCTelevisionModel *model; 14 @property (nonatomic, strong) LVCTelevisionModel *model;
15 -@property (nonatomic, strong) ProgramModel *programModel; 15 +@property (nonatomic, strong) LVCVodListModel *programModel;
16 16
17 @end 17 @end
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.m
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 35
36 } 36 }
37 37
38 -- (void)setProgramModel:(ProgramModel *)programModel { 38 +- (void)setProgramModel:(LVCVodListModel *)programModel {
39 39
40 [_imgView sd_setImageWithURL:[NSURL URLWithString:programModel.img] placeholderImage:[UIImage imageNamed:@"load_03"]]; 40 [_imgView sd_setImageWithURL:[NSURL URLWithString:programModel.img] placeholderImage:[UIImage imageNamed:@"load_03"]];
41 _titleLab.text = programModel.title; 41 _titleLab.text = programModel.title;
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentView.m
@@ -54,8 +54,8 @@ static NSString *commentCellId = @"commentCellId"; @@ -54,8 +54,8 @@ static NSString *commentCellId = @"commentCellId";
54 } else { 54 } else {
55 _desHeight = 0; 55 _desHeight = 0;
56 } 56 }
57 - [self getCommentListWithPid:@"123"];  
58 - [self getCommentCountWithPid:@"123"]; 57 + [self getCommentListWithPid:model.vId];
  58 + [self getCommentCountWithPid:model.vId];
59 } 59 }
60 60
61 #pragma mark - 获取评论列表 61 #pragma mark - 获取评论列表
@@ -248,13 +248,16 @@ static NSString *commentCellId = @"commentCellId"; @@ -248,13 +248,16 @@ static NSString *commentCellId = @"commentCellId";
248 #pragma mark - UITextFieldDelegate 248 #pragma mark - UITextFieldDelegate
249 - (BOOL)textFieldShouldReturn:(UITextField *)textField { 249 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
250 250
251 - [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:@"123" sid:@"555" comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) { 251 + textField.text = @"";
  252 + [textField resignFirstResponder];
  253 +
  254 + [[CNLiveCommentManager sharedCNLiveCommentManager] commentOnProgramWithProgramId:_model.vId sid:[UserInformationModel manager].uid comment:textField.text completion:^(NSString *errorCode, NSString *errorMsg) {
252 255
253 if ([errorCode isEqualToString:@"0"]) { 256 if ([errorCode isEqualToString:@"0"]) {
254 - textField.text = @"";  
255 - [textField resignFirstResponder];  
256 - [self getCommentListWithPid:@"123"];  
257 - [self getCommentCountWithPid:@"123"]; 257 + [self getCommentListWithPid:_model.vId];
  258 + [self getCommentCountWithPid:_model.vId];
  259 + } else {
  260 + [Tools showHUDInView:self withString:@"发送消息失败" autoHide:YES];
258 } 261 }
259 }]; 262 }];
260 return YES; 263 return YES;