Commit 09f49703fde39de42288df2edda56751bc0201f6
1 parent
66da9870
评论
Showing
4 changed files
with
13 additions
and
10 deletions
LiveVideoCloud/AppDelegate/AppDelegate.m
| ... | ... | @@ -29,7 +29,7 @@ |
| 29 | 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 | 34 | //初始化用户SDK |
| 35 | 35 | [CNLiveUserSystemCenter setAppId:UserAppId appKey:UserAppKey appSecret:UserAppSceret isTestEnvironment:self.isTestEnvironment]; | ... | ... |
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.h
LiveVideoCloud/Classes/Sections/PGCSections/View/LVCTelevisionCell.m
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | -- (void)setProgramModel:(ProgramModel *)programModel { | |
| 38 | +- (void)setProgramModel:(LVCVodListModel *)programModel { | |
| 39 | 39 | |
| 40 | 40 | [_imgView sd_setImageWithURL:[NSURL URLWithString:programModel.img] placeholderImage:[UIImage imageNamed:@"load_03"]]; |
| 41 | 41 | _titleLab.text = programModel.title; | ... | ... |
LiveVideoCloud/Classes/Sections/homeSections/View/LVCCommentView.m
| ... | ... | @@ -54,8 +54,8 @@ static NSString *commentCellId = @"commentCellId"; |
| 54 | 54 | } else { |
| 55 | 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 | 61 | #pragma mark - 获取评论列表 |
| ... | ... | @@ -248,13 +248,16 @@ static NSString *commentCellId = @"commentCellId"; |
| 248 | 248 | #pragma mark - UITextFieldDelegate |
| 249 | 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 | 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 | 263 | return YES; | ... | ... |