CNLiveCServiceManagerBridge.h 1.85 KB
//
//  CNLiveCServiceManagerBridge.h
//  CNLiveCServiceModule
//
//  Created by CNLive on 2021/12/2.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSInteger , CNCServiceJumpType) {
    CNCServiceJumpTypeService,      //服务内容跳转逻辑
   CNCServiceJumpTypeGetPage,       //getpage获取内容
    CNCServiceJumpTypeWebVC         //电商h5页面
};
@protocol CNLiveCServiceProtocol <NSObject>

/**
 *  服务号跳转
 *
 *  @param type                type
 *  @param param               参数
 */
- (void)jumpControllerType:(CNCServiceJumpType)type  param:(NSDictionary *_Nullable)param controller:(UIViewController *_Nullable)controller;
@end

NS_ASSUME_NONNULL_BEGIN

@interface CNLiveCServiceManagerBridge : NSObject

@property (nonatomic, strong) id<CNLiveCServiceProtocol> protocol;

+ (instancetype) shareManager;
+ (UIViewController *)viewControllerFromView:(UIView *)view;

/**
 *  服务号跳转
 *
 *  @param serviceId    服务号id
 *  @param type                type
 *  @param to                    to
 *  @param shopType       shopType
 */
+ (void)jumpServiceController:(NSString *)serviceId
                showAgreement:(NSString *)showAgreement
                agreementDesc:(NSString *)agreementDesc
                         type:(NSString *)type
                           to:(NSString *)to
                     shopType:(NSString *)shopType
                   controller:(UIViewController *)controller;
/**
 *  服务号跳转
 *
 *  @param type                type
 *  @param param               参数
 */
+ (void)jumpViewControllerType:(CNCServiceJumpType)type
                         param:(NSDictionary *)param
                    controller:(UIViewController *)controller;

/**
 *服务号跳转
 *@param urlStr    网页地址
 */
+ (void)jumpWebVCWithUrl:(NSString *)urlStr controller:(UIViewController *)controller;
@end

NS_ASSUME_NONNULL_END