Commit 0e6f7146780baa3069ebd7c4739e765e7375dd9a
1 parent
3cfa7c4f
修复云测bug 0.5.3
Showing
3 changed files
with
23 additions
and
3 deletions
CNLiveVideoClassifyKit.podspec
CNLiveVideoClassifyKit/Classes/SearchView/View/CNWitnessSearchPersonCell.m
| ... | ... | @@ -53,6 +53,11 @@ |
| 53 | 53 | return self; |
| 54 | 54 | } |
| 55 | 55 | - (void)focusedBtnClick:(QMUIButton *)sender{ |
| 56 | + if (![CNUserShareManager isLogin]) { | |
| 57 | + #pragma mark -- TODO grp | |
| 58 | + [CNLiveClassifyJumpBridge showLoginViewWithString:@""]; | |
| 59 | + return; | |
| 60 | + } | |
| 56 | 61 | weakself |
| 57 | 62 | [QMUITips showLoadingInView:self.contentView]; |
| 58 | 63 | [CNWitnessSearchPresent requestContentGetContentHeaderFocusType:!sender.selected ToSid:_model.id responseBlock:^(BOOL succeed) { | ... | ... |
CNLiveVideoClassifyKit/Classes/SearchView/View/CNWitnessSearchVideoCell.m
| ... | ... | @@ -65,6 +65,11 @@ |
| 65 | 65 | } |
| 66 | 66 | #pragma mark - Action |
| 67 | 67 | - (void)likeBtnClick:(QMUIButton *)sender{ |
| 68 | + if (![CNUserShareManager isLogin]) { | |
| 69 | + #pragma mark -- TODO grp | |
| 70 | + [CNLiveClassifyJumpBridge showLoginViewWithString:@""]; | |
| 71 | + return; | |
| 72 | + } | |
| 68 | 73 | [QMUITips showLoadingInView:self.contentView]; |
| 69 | 74 | weakself |
| 70 | 75 | [CNWitnessSearchPresent requestWitnessLikeMomentWithPid:self.model.pid ContentSid:self.model.icon.id support:sender.selected?@"0":@"1" contentTag:self.model.tagName responseBlock:^(BOOL succeed) { |
| ... | ... | @@ -79,11 +84,21 @@ |
| 79 | 84 | weakSelf.model.tool.likesNum ++; |
| 80 | 85 | } |
| 81 | 86 | weakSelf.model.tool.liked = sender.selected; |
| 82 | - [self.likeBtn setTitle:[NSString stringWithFormat:@"%ld",weakSelf.model.tool.likesNum] forState:UIControlStateNormal]; | |
| 83 | - [self.likeBtn setTitle:[NSString stringWithFormat:@"%ld",weakSelf.model.tool.likesNum] forState:UIControlStateSelected]; | |
| 87 | + [weakSelf.likeBtn setTitle:[NSString stringWithFormat:@"%ld",weakSelf.model.tool.likesNum] forState:UIControlStateNormal]; | |
| 88 | + [weakSelf.likeBtn setTitle:[NSString stringWithFormat:@"%ld",weakSelf.model.tool.likesNum] forState:UIControlStateSelected]; | |
| 89 | + [weakSelf notificationH5Update]; | |
| 84 | 90 | } |
| 85 | 91 | }]; |
| 86 | 92 | } |
| 93 | +- (void)notificationH5Update{ | |
| 94 | + NSDictionary *dic = @{ | |
| 95 | + @"contentId":self.model.contentId?self.model.contentId:@"", | |
| 96 | + @"selected":self.model.tool.liked?@"true":@"false", | |
| 97 | + @"model":self.model.model?self.model.model:@"" | |
| 98 | + }; | |
| 99 | + [[NSNotificationCenter defaultCenter] postNotificationName:@"WjjWitnessLikeStatusNotification" object:nil userInfo:dic]; | |
| 100 | + [[NSNotificationCenter defaultCenter] postNotificationName:@"Wjjh5WitnessLikeStatusNotification" object:nil userInfo:dic]; | |
| 101 | +} | |
| 87 | 102 | #pragma mark - Setting |
| 88 | 103 | - (void)setModel:(CNWitnessSearchDetailModel *)model{ |
| 89 | 104 | _model = model; | ... | ... |