Commit 6a62853cbe465d7e276fc8b158bbf06a415ccd9a

Authored by yanglingyu
1 parent 94d564cd

0.6.2

CNLiveVideoClassifyKit.podspec
... ... @@ -8,7 +8,7 @@
8 8  
9 9 Pod::Spec.new do |s|
10 10 s.name = 'CNLiveVideoClassifyKit'
11   - s.version = '0.6.1'
  11 + s.version = '0.6.2'
12 12 s.summary = '视讯头部一二级菜单组件'
13 13  
14 14 # This description is used to generate tags and improve search results.
... ...
CNLiveVideoClassifyKit/Classes/CNGenesis/Model/CNAmuseContentProductModel.h
... ... @@ -22,6 +22,14 @@ NS_ASSUME_NONNULL_BEGIN
22 22 @property (nonatomic , copy) NSString *expiryDate;
23 23 @property (nonatomic , copy) NSString *validPeriod;
24 24 @property (nonatomic , copy) NSString *effectiveDate;
  25 +@property (nonatomic , copy) NSString *check;
  26 +@property (nonatomic , copy) NSString *albumProductType;
  27 +@property (nonatomic , copy) NSString *androidOriginalRmb;
  28 +@property (nonatomic , copy) NSString *iosOriginalRmb;
  29 +@property (nonatomic , copy) NSString *productImg;
  30 +@property (nonatomic , copy) NSString *productTitle;
  31 +@property (nonatomic , copy) NSString *promCode;
  32 +
25 33 @end
26 34  
27 35 NS_ASSUME_NONNULL_END
... ...
CNLiveVideoClassifyKit/Classes/SearchView/Model/CNWitnessSearchModel.h
... ... @@ -6,6 +6,7 @@
6 6 //
7 7  
8 8 #import <Foundation/Foundation.h>
  9 +#import "CNAmuseContentProductModel.h"
9 10  
10 11 NS_ASSUME_NONNULL_BEGIN
11 12  
... ... @@ -72,6 +73,10 @@ NS_ASSUME_NONNULL_BEGIN
72 73 /// 是否横屏
73 74 @property (nonatomic, assign)NSInteger isHorizontalScreen;
74 75 @property (nonatomic, assign)NSInteger videoShowType;
  76 +
  77 +@property (nonatomic, strong)NSDictionary *block;
  78 +@property (nonatomic, strong)CNAmuseContentProductModel *product;
  79 +
75 80 @end
76 81  
77 82 NS_ASSUME_NONNULL_END
... ...
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchDetailController.m
... ... @@ -32,6 +32,10 @@
32 32 #ifndef WjjWitnessCollectStatusNotification
33 33 #define WjjWitnessCollectStatusNotification @"WjjWitnessCollectStatusNotification"
34 34 #endif
  35 +//付费视频
  36 +#ifndef WjjVideoPaySuccessNotification
  37 +#define WjjVideoPaySuccessNotification @"WjjVideoPaySuccessNotification"
  38 +#endif
35 39 static NSString *const CNWitnessSearchVideoCellID = @"CNWitnessSearchVideoCell";
36 40 static NSString *const CNWitnessSearchPersonCellID = @"CNWitnessSearchPersonCell";
37 41 @interface CNWitnessSearchDetailController ()<UICollectionViewDelegate,UICollectionViewDataSource,CNWaterFallLayoutDelegate,UIGestureRecognizerDelegate>
... ... @@ -55,9 +59,6 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
55 59 weakself
56 60 [QMUITips showLoadingInView:self.view];
57 61 [CNWitnessSearchPresent requestSearchVideoListWithTS:self.ts searchType:self.type + 1 tagId:self.tagId keyword:self.searchStr page:self.page responseBlock:^(NSArray *dataArray, BOOL isLastPage, NSString *error) {
58   - if ([weakSelf.tagId isNotBlank]) {
59   - weakSelf.tagId = @"";
60   - }
61 62 [QMUITips hideAllTips];
62 63 [weakSelf.collectionView.mj_footer endRefreshing];
63 64 if (error) {
... ... @@ -136,6 +137,7 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
136 137 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoShareChange:) name:WjjWitnessShareNotification object:nil];
137 138 //收藏
138 139 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoCollectChange:) name:WjjWitnessCollectStatusNotification object:nil];
  140 + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoPlaySuccess:) name:WjjVideoPaySuccessNotification object:nil];
139 141 }else{
140 142 [[CNLiveListManager shareListManager] addObserver:self forKeyPath:@"personMessage" options:NSKeyValueObservingOptionNew context:NULL];
141 143 }
... ... @@ -218,6 +220,14 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
218 220 [self.collectionView reloadItemsAtIndexPaths:@[[NSIndexPath indexPathForItem:index inSection:0]]];
219 221 }
220 222 }
  223 +- (void)videoPlaySuccess:(NSNotification *)noti{
  224 + NSString *productId = [noti.userInfo objectForKey:@"productId"];
  225 + [self.dataSource enumerateObjectsUsingBlock:^(CNWitnessSearchDetailModel *detailModel, NSUInteger idx, BOOL * _Nonnull stop) {
  226 + if ([detailModel.product.productId isEqualToString:productId]) {
  227 + detailModel.product.check = @"1";
  228 + }
  229 + }];
  230 +}
221 231 #pragma mark - UIGestureRecognizerDelegate
222 232  
223 233 -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
... ...
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchListController.m
... ... @@ -46,7 +46,6 @@
46 46 NSDictionary *controllers = self.listContainerView.validListDict;
47 47 CNWitnessSearchListController *vc = controllers[@(index)];
48 48 vc.searchStr = self.searchStr;
49   - vc.tagId = self.tagId;
50 49 }
51 50 #pragma mark - JXCategoryListContainerViewDelegate
52 51 - (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
... ... @@ -90,6 +89,10 @@
90 89 self.lineX = self.lineView.x;
91 90 NSDictionary *controllers = self.listContainerView.validListDict;
92 91 CNWitnessSearchListController *vc = controllers[@(self.selectIndex)];
  92 + vc.tagId = self.tagId;
  93 + if ([self.tagId isNotBlank]) {
  94 + self.tagId = @"";
  95 + }
93 96 vc.searchStr = self.searchStr;
94 97 }
95 98 - (void)setSelectIndex:(NSInteger)selectIndex{
... ...
Example/CNLiveVideoClassifyKit/CNLIVEAppDelegate.m
... ... @@ -17,7 +17,7 @@
17 17  
18 18 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
19 19 {
20   - [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];//CNLiveDebugAppStore];//CNLiveProductionAppStore//CNLiveTestFlight
  20 + [CNLiveEnvironmentManager setEnvironment:CNLiveDebugAppStore];//CNLiveDebugAppStore];//CNLiveProductionAppStore//CNLiveTestFlight
21 21  
22 22 [BHContext shareInstance].application = application;
23 23 [BHContext shareInstance].launchOptions = launchOptions;
... ...
Example/CNLiveVideoClassifyKit/CNLIVEViewController.m
... ... @@ -82,7 +82,7 @@
82 82 break;
83 83 case 2:
84 84 {
85   - [CNLiveListManager pushWitnessSearchVCWithSearchStr:@{}];
  85 + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@{@"tagId":@"1",@"tagName":@"爆料"}];
86 86 }
87 87 break;
88 88 default:
... ...