CNLiveClassifyKitImpl.m 4.34 KB
//
//  CNLiveClassifyKitImpl.m
//  CNLiveVideoClassifyKit_Example
//
//  Created by CNLive on 2021/9/9.
//  Copyright © 2021 杨苓玉. All rights reserved.
//

#import "CNLiveClassifyKitImpl.h"
#import "CNLIVEDemoViewController.h"
#import "CNLIVEViewController.h"
#import <CNLiveCWebViewModule/CNLiveCWebViewModule.h>
#import <CNLiveVideoClassifyKit/CNAmuseChinaViewController.h>
#import <CNLiveCWebViewModule/CNLiveSubWebViewController.h>
#import "CNLiveWebViewModuleImpl.h"
#import <CNLiveCommonCategory/NSString+CNLiveUrlEncode.h>

@implementation CNLiveClassifyKitImpl

-(UIViewController *)listViewShowPageType:(NSUInteger)pageType param:(NSDictionary *)param
{
    if (pageType == 4|| pageType == 5) {
        CNAmuseChinaViewController *amVC = [[CNAmuseChinaViewController alloc] init];
        amVC.isBlack = [param boolForKey:@"isBlack"];
        amVC.bgColor = CNLiveColorWithHexString(param[@"bgColor"]);
        amVC.title = param[@"title"];
        amVC.backgroundImg = param[@"backgroundImg"];
        amVC.channelId = param[@"channelId"];
        amVC.channelName = param[@"channelName"];
        amVC.pageId = param[@"pageId"];
        return amVC;
    }else if (pageType == 2){
        CNLIVEViewController *demo = [CNLIVEViewController new];
        return demo;
    }else if (pageType == 7){
        CNLIVEViewController *demo = [CNLIVEViewController new];
        return demo;
    }else{
        NSString *thirdUrl = param[@"thirdUrl"];
        NSString *backgroundColor = param[@"bgColor"];
        NSString *backImageH5 = param[@"backgroundImgH5"];
        if (!CNLiveStringIsEmpty(thirdUrl)) {
            NSString *andStr = @"&";
            if (![thirdUrl cn_containsString:@"?"]) {
                andStr = @"?";
            }
            thirdUrl = [thirdUrl stringByAppendingFormat:@"%@backgroundColor=%@&backgroundImgH5=%@",andStr,backgroundColor?backgroundColor:@"",backImageH5?[backImageH5 urlEncode]:@""];
        }
        CNLiveSubWebViewController *subVC = (CNLiveSubWebViewController*)[CNLiveWebViewModuleImpl pushClassifyWebViewWithWebTitle:param[@"title"] url:thirdUrl intercept:YES isHiddenFirst:NO isBlack:[param boolForKey:@"isBlack"]];
        return subVC;
    }
    
}
-(UIView *)showViewOrPushVCWithCurrentVC:(UIViewController *)currentVC
                                pushType:(CNLiveClassifyJumpType)type pageType:(NSInteger)pageType param:(NSDictionary *_Nullable)param {
    return [UIView new];
}
-(BOOL)audioPlayerIsplaying
{
    return YES;
}
-(void)listViewRefreshWithVC:(UIViewController *)currentVC
                    pageType:(NSInteger)pageType
                       param:(NSDictionary *)param
                 refreshTime:(NSTimeInterval)time{
    
}
- (void)checkForloginTurnToWithURL:(NSURL *)url{}

- (void)checkWithFunctionForShareURL:(NSString *)shareUrl{}

- (void)bringCenterLoginViewToFront{}

-(void)popOverShowEvent:(UIEvent *)event
                imageDone:(FTPopDoneBlock)doneBlock
           dismissBlock:(FTPopDismissBlock)dismissBlock{
    
}

- (void)requestSPClassNoNotifWithIsFocus:(BOOL)isFocus SPId:(nonnull NSString *)spId CompleterBlock:(nonnull void (^)(BOOL, BOOL))completerBlock {
    
}


- (void)showLoginViewWithString:(nonnull NSString *)loginPrepositionUrl {
    
}


- (void)showShareViewWithParamForShareTitle:(nonnull NSString *)shareTitle ShareUrl:(nonnull NSString *)shareUrl ShareDesc:(nonnull NSString *)shareDesc ShareImage:(nonnull id)shareImage ScreenFull:(BOOL)isFull HiddenWjj:(BOOL)isHiddenWjj HiddenQQ:(BOOL)isHiddenQQ HiddenWB:(BOOL)isHiddenWB HiddenLifeCircle:(BOOL)isHiddenLifeCircle HiddenWechatCircle:(BOOL)isHiddenWechatCircle HiddenWechat:(BOOL)isHiddenWechat HiddenSafari:(BOOL)isHiddenSafari FormVC:(nonnull UIViewController *)formVC TopImage:(nonnull NSArray<NSString *> *)topImage TopTitles:(nonnull NSArray<NSString *> *)topTitle programId:(nonnull NSString *)programId channelName:(nonnull NSString *)channelName {
    
}


- (void)skipType:(nonnull NSString *)type to:(nonnull NSString *)to shopType:(nonnull NSString *)shopType currentVC:(nonnull UIViewController *)currentVC {
    
}
/// 打开用户个人视频页
/// @param params 传递参数
- (void)openPersonMessage:(NSDictionary *)params{
    
}
/// 打开视频播放页面
/// @param currentIndex 当前选中
/// @param dataList 视频数组
- (void)openVideoPlayerVCWithCurrentIndex:(NSString *)currentIndex  dataList:(NSArray *)dataList{
    
}

@end