Commit 0e6f7146780baa3069ebd7c4739e765e7375dd9a
1 parent
3cfa7c4f
修复云测bug 0.5.3
Showing
3 changed files
with
23 additions
and
3 deletions
CNLiveVideoClassifyKit.podspec
| @@ -8,7 +8,7 @@ | @@ -8,7 +8,7 @@ | ||
| 8 | 8 | ||
| 9 | Pod::Spec.new do |s| | 9 | Pod::Spec.new do |s| |
| 10 | s.name = 'CNLiveVideoClassifyKit' | 10 | s.name = 'CNLiveVideoClassifyKit' |
| 11 | - s.version = '0.5.2' | 11 | + s.version = '0.5.3' |
| 12 | s.summary = '视讯头部一二级菜单组件' | 12 | s.summary = '视讯头部一二级菜单组件' |
| 13 | 13 | ||
| 14 | # This description is used to generate tags and improve search results. | 14 | # This description is used to generate tags and improve search results. |
CNLiveVideoClassifyKit/Classes/SearchView/View/CNWitnessSearchPersonCell.m
| @@ -53,6 +53,11 @@ | @@ -53,6 +53,11 @@ | ||
| 53 | return self; | 53 | return self; |
| 54 | } | 54 | } |
| 55 | - (void)focusedBtnClick:(QMUIButton *)sender{ | 55 | - (void)focusedBtnClick:(QMUIButton *)sender{ |
| 56 | + if (![CNUserShareManager isLogin]) { | ||
| 57 | + #pragma mark -- TODO grp | ||
| 58 | + [CNLiveClassifyJumpBridge showLoginViewWithString:@""]; | ||
| 59 | + return; | ||
| 60 | + } | ||
| 56 | weakself | 61 | weakself |
| 57 | [QMUITips showLoadingInView:self.contentView]; | 62 | [QMUITips showLoadingInView:self.contentView]; |
| 58 | [CNWitnessSearchPresent requestContentGetContentHeaderFocusType:!sender.selected ToSid:_model.id responseBlock:^(BOOL succeed) { | 63 | [CNWitnessSearchPresent requestContentGetContentHeaderFocusType:!sender.selected ToSid:_model.id responseBlock:^(BOOL succeed) { |
CNLiveVideoClassifyKit/Classes/SearchView/View/CNWitnessSearchVideoCell.m
| @@ -65,6 +65,11 @@ | @@ -65,6 +65,11 @@ | ||
| 65 | } | 65 | } |
| 66 | #pragma mark - Action | 66 | #pragma mark - Action |
| 67 | - (void)likeBtnClick:(QMUIButton *)sender{ | 67 | - (void)likeBtnClick:(QMUIButton *)sender{ |
| 68 | + if (![CNUserShareManager isLogin]) { | ||
| 69 | + #pragma mark -- TODO grp | ||
| 70 | + [CNLiveClassifyJumpBridge showLoginViewWithString:@""]; | ||
| 71 | + return; | ||
| 72 | + } | ||
| 68 | [QMUITips showLoadingInView:self.contentView]; | 73 | [QMUITips showLoadingInView:self.contentView]; |
| 69 | weakself | 74 | weakself |
| 70 | [CNWitnessSearchPresent requestWitnessLikeMomentWithPid:self.model.pid ContentSid:self.model.icon.id support:sender.selected?@"0":@"1" contentTag:self.model.tagName responseBlock:^(BOOL succeed) { | 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,11 +84,21 @@ | ||
| 79 | weakSelf.model.tool.likesNum ++; | 84 | weakSelf.model.tool.likesNum ++; |
| 80 | } | 85 | } |
| 81 | weakSelf.model.tool.liked = sender.selected; | 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 | #pragma mark - Setting | 102 | #pragma mark - Setting |
| 88 | - (void)setModel:(CNWitnessSearchDetailModel *)model{ | 103 | - (void)setModel:(CNWitnessSearchDetailModel *)model{ |
| 89 | _model = model; | 104 | _model = model; |