Commit 6a62853cbe465d7e276fc8b158bbf06a415ccd9a

Authored by yanglingyu
1 parent 94d564cd

0.6.2

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.6.1' 11 + s.version = '0.6.2'
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/CNGenesis/Model/CNAmuseContentProductModel.h
@@ -22,6 +22,14 @@ NS_ASSUME_NONNULL_BEGIN @@ -22,6 +22,14 @@ NS_ASSUME_NONNULL_BEGIN
22 @property (nonatomic , copy) NSString *expiryDate; 22 @property (nonatomic , copy) NSString *expiryDate;
23 @property (nonatomic , copy) NSString *validPeriod; 23 @property (nonatomic , copy) NSString *validPeriod;
24 @property (nonatomic , copy) NSString *effectiveDate; 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 @end 33 @end
26 34
27 NS_ASSUME_NONNULL_END 35 NS_ASSUME_NONNULL_END
CNLiveVideoClassifyKit/Classes/SearchView/Model/CNWitnessSearchModel.h
@@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
6 // 6 //
7 7
8 #import <Foundation/Foundation.h> 8 #import <Foundation/Foundation.h>
  9 +#import "CNAmuseContentProductModel.h"
9 10
10 NS_ASSUME_NONNULL_BEGIN 11 NS_ASSUME_NONNULL_BEGIN
11 12
@@ -72,6 +73,10 @@ NS_ASSUME_NONNULL_BEGIN @@ -72,6 +73,10 @@ NS_ASSUME_NONNULL_BEGIN
72 /// 是否横屏 73 /// 是否横屏
73 @property (nonatomic, assign)NSInteger isHorizontalScreen; 74 @property (nonatomic, assign)NSInteger isHorizontalScreen;
74 @property (nonatomic, assign)NSInteger videoShowType; 75 @property (nonatomic, assign)NSInteger videoShowType;
  76 +
  77 +@property (nonatomic, strong)NSDictionary *block;
  78 +@property (nonatomic, strong)CNAmuseContentProductModel *product;
  79 +
75 @end 80 @end
76 81
77 NS_ASSUME_NONNULL_END 82 NS_ASSUME_NONNULL_END
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchDetailController.m
@@ -32,6 +32,10 @@ @@ -32,6 +32,10 @@
32 #ifndef WjjWitnessCollectStatusNotification 32 #ifndef WjjWitnessCollectStatusNotification
33 #define WjjWitnessCollectStatusNotification @"WjjWitnessCollectStatusNotification" 33 #define WjjWitnessCollectStatusNotification @"WjjWitnessCollectStatusNotification"
34 #endif 34 #endif
  35 +//付费视频
  36 +#ifndef WjjVideoPaySuccessNotification
  37 +#define WjjVideoPaySuccessNotification @"WjjVideoPaySuccessNotification"
  38 +#endif
35 static NSString *const CNWitnessSearchVideoCellID = @"CNWitnessSearchVideoCell"; 39 static NSString *const CNWitnessSearchVideoCellID = @"CNWitnessSearchVideoCell";
36 static NSString *const CNWitnessSearchPersonCellID = @"CNWitnessSearchPersonCell"; 40 static NSString *const CNWitnessSearchPersonCellID = @"CNWitnessSearchPersonCell";
37 @interface CNWitnessSearchDetailController ()<UICollectionViewDelegate,UICollectionViewDataSource,CNWaterFallLayoutDelegate,UIGestureRecognizerDelegate> 41 @interface CNWitnessSearchDetailController ()<UICollectionViewDelegate,UICollectionViewDataSource,CNWaterFallLayoutDelegate,UIGestureRecognizerDelegate>
@@ -55,9 +59,6 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell @@ -55,9 +59,6 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
55 weakself 59 weakself
56 [QMUITips showLoadingInView:self.view]; 60 [QMUITips showLoadingInView:self.view];
57 [CNWitnessSearchPresent requestSearchVideoListWithTS:self.ts searchType:self.type + 1 tagId:self.tagId keyword:self.searchStr page:self.page responseBlock:^(NSArray *dataArray, BOOL isLastPage, NSString *error) { 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 [QMUITips hideAllTips]; 62 [QMUITips hideAllTips];
62 [weakSelf.collectionView.mj_footer endRefreshing]; 63 [weakSelf.collectionView.mj_footer endRefreshing];
63 if (error) { 64 if (error) {
@@ -136,6 +137,7 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell @@ -136,6 +137,7 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
136 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoShareChange:) name:WjjWitnessShareNotification object:nil]; 137 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoShareChange:) name:WjjWitnessShareNotification object:nil];
137 //收藏 138 //收藏
138 [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(videoCollectChange:) name:WjjWitnessCollectStatusNotification object:nil]; 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 }else{ 141 }else{
140 [[CNLiveListManager shareListManager] addObserver:self forKeyPath:@"personMessage" options:NSKeyValueObservingOptionNew context:NULL]; 142 [[CNLiveListManager shareListManager] addObserver:self forKeyPath:@"personMessage" options:NSKeyValueObservingOptionNew context:NULL];
141 } 143 }
@@ -218,6 +220,14 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell @@ -218,6 +220,14 @@ static NSString *const CNWitnessSearchPersonCellID = @&quot;CNWitnessSearchPersonCell
218 [self.collectionView reloadItemsAtIndexPaths:@[[NSIndexPath indexPathForItem:index inSection:0]]]; 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 #pragma mark - UIGestureRecognizerDelegate 231 #pragma mark - UIGestureRecognizerDelegate
222 232
223 -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{ 233 -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView{
CNLiveVideoClassifyKit/Classes/SearchView/ViewController/CNWitnessSearchListController.m
@@ -46,7 +46,6 @@ @@ -46,7 +46,6 @@
46 NSDictionary *controllers = self.listContainerView.validListDict; 46 NSDictionary *controllers = self.listContainerView.validListDict;
47 CNWitnessSearchListController *vc = controllers[@(index)]; 47 CNWitnessSearchListController *vc = controllers[@(index)];
48 vc.searchStr = self.searchStr; 48 vc.searchStr = self.searchStr;
49 - vc.tagId = self.tagId;  
50 } 49 }
51 #pragma mark - JXCategoryListContainerViewDelegate 50 #pragma mark - JXCategoryListContainerViewDelegate
52 - (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{ 51 - (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView{
@@ -90,6 +89,10 @@ @@ -90,6 +89,10 @@
90 self.lineX = self.lineView.x; 89 self.lineX = self.lineView.x;
91 NSDictionary *controllers = self.listContainerView.validListDict; 90 NSDictionary *controllers = self.listContainerView.validListDict;
92 CNWitnessSearchListController *vc = controllers[@(self.selectIndex)]; 91 CNWitnessSearchListController *vc = controllers[@(self.selectIndex)];
  92 + vc.tagId = self.tagId;
  93 + if ([self.tagId isNotBlank]) {
  94 + self.tagId = @"";
  95 + }
93 vc.searchStr = self.searchStr; 96 vc.searchStr = self.searchStr;
94 } 97 }
95 - (void)setSelectIndex:(NSInteger)selectIndex{ 98 - (void)setSelectIndex:(NSInteger)selectIndex{
Example/CNLiveVideoClassifyKit/CNLIVEAppDelegate.m
@@ -17,7 +17,7 @@ @@ -17,7 +17,7 @@
17 17
18 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 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 [BHContext shareInstance].application = application; 22 [BHContext shareInstance].application = application;
23 [BHContext shareInstance].launchOptions = launchOptions; 23 [BHContext shareInstance].launchOptions = launchOptions;
Example/CNLiveVideoClassifyKit/CNLIVEViewController.m
@@ -82,7 +82,7 @@ @@ -82,7 +82,7 @@
82 break; 82 break;
83 case 2: 83 case 2:
84 { 84 {
85 - [CNLiveListManager pushWitnessSearchVCWithSearchStr:@{}]; 85 + [CNLiveListManager pushWitnessSearchVCWithSearchStr:@{@"tagId":@"1",@"tagName":@"爆料"}];
86 } 86 }
87 break; 87 break;
88 default: 88 default: