Commit aa9a756be838e6000939576d19f8622b0ee8b59f

Authored by yanglingyu
1 parent ce89cccb

登录时闪退,跳转逻辑修改

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.0.13' 11 + s.version = '0.0.14'
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/Controller/CNCategoryBaseViewController.h
@@ -15,10 +15,11 @@ NS_ASSUME_NONNULL_BEGIN @@ -15,10 +15,11 @@ NS_ASSUME_NONNULL_BEGIN
15 @property (nonatomic, strong) JXCategoryListContainerView *listContainerView; 15 @property (nonatomic, strong) JXCategoryListContainerView *listContainerView;
16 @property (nonatomic, strong) NSMutableArray *titles;//标题 16 @property (nonatomic, strong) NSMutableArray *titles;//标题
17 @property (nonatomic, assign) NSInteger ld_currentIndex; //当前选中 17 @property (nonatomic, assign) NSInteger ld_currentIndex; //当前选中
  18 +@property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类
18 19
19 -(JXCategoryBaseView *)preferredCategoryView; 20 -(JXCategoryBaseView *)preferredCategoryView;
20 -(CGFloat)preferredCategoryViewHeight; 21 -(CGFloat)preferredCategoryViewHeight;
21 -- (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index; 22 +- (void)categoryViewSelectedItemAtIndex:(NSInteger)index;
22 @end 23 @end
23 24
24 NS_ASSUME_NONNULL_END 25 NS_ASSUME_NONNULL_END
CNLiveVideoClassifyKit/Classes/Controller/CNCategoryBaseViewController.m
@@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
7 7
8 #import "CNCategoryBaseViewController.h" 8 #import "CNCategoryBaseViewController.h"
9 #import "CNLiveListController.h" 9 #import "CNLiveListController.h"
  10 +#import "CNLiveListManager.h"
10 11
11 @interface CNCategoryBaseViewController () 12 @interface CNCategoryBaseViewController ()
12 @end 13 @end
@@ -38,6 +39,12 @@ @@ -38,6 +39,12 @@
38 } 39 }
39 40
40 #pragma mark - Public 41 #pragma mark - Public
  42 +- (void)categoryViewSelectedItemAtIndex:(NSInteger)index
  43 +{
  44 + self.ld_currentIndex = index;
  45 + [[CNLiveListManager shareListManager] setIsHiddenFirst:NO];
  46 + self.isHiddenFirst = NO;
  47 +}
41 48
42 -(JXCategoryBaseView *)preferredCategoryView{ 49 -(JXCategoryBaseView *)preferredCategoryView{
43 return [[JXCategoryBaseView alloc] init]; 50 return [[JXCategoryBaseView alloc] init];
CNLiveVideoClassifyKit/Classes/Controller/CNLiveClassifySegmentController.m
@@ -52,7 +52,6 @@ static const CGFloat animationHeight = 15; @@ -52,7 +52,6 @@ static const CGFloat animationHeight = 15;
52 @property (nonatomic, assign) BOOL isLoading; 52 @property (nonatomic, assign) BOOL isLoading;
53 @property (nonatomic, assign) BOOL isDSShopChanged; 53 @property (nonatomic, assign) BOOL isDSShopChanged;
54 @property (nonatomic, assign) BOOL contentLogin;//从内容跳过来的 54 @property (nonatomic, assign) BOOL contentLogin;//从内容跳过来的
55 -@property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类  
56 55
57 @end 56 @end
58 57
CNLiveVideoClassifyKit/Classes/Controller/CNLiveSubSegmentController.m
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 @property (nonatomic, strong) UIButton *historyBtn;//历史记录 22 @property (nonatomic, strong) UIButton *historyBtn;//历史记录
23 @property (nonatomic, strong) UIButton *downloadingBtn;//听见中国下载按钮 23 @property (nonatomic, strong) UIButton *downloadingBtn;//听见中国下载按钮
24 24
25 -@property (nonatomic, assign)BOOL isHiddenFirst;//是否隐藏一级分类 25 +
26 26
27 27
28 @property (nonatomic, strong)NSArray<CNCategoryGetChannelModel*> *pageListArr; 28 @property (nonatomic, strong)NSArray<CNCategoryGetChannelModel*> *pageListArr;
@@ -83,7 +83,7 @@ @@ -83,7 +83,7 @@
83 } 83 }
84 if (self.selectChannelId != -1) { 84 if (self.selectChannelId != -1) {
85 NSString *classifyId = [BHConfig get:ChannelsSelectSecond]; 85 NSString *classifyId = [BHConfig get:ChannelsSelectSecond];
86 - [BHConfig set:ChannelsSelectSecond value:nil]; 86 + [BHConfig set:ChannelsSelectSecond value:@""];
87 if (!CNLiveStringIsEmpty(classifyId)) { 87 if (!CNLiveStringIsEmpty(classifyId)) {
88 NSInteger selectChannelId = [self containsWithChannelIndex:self.selectChannelId classifyId:classifyId]; 88 NSInteger selectChannelId = [self containsWithChannelIndex:self.selectChannelId classifyId:classifyId];
89 if(selectChannelId == -1){ 89 if(selectChannelId == -1){