CNLiveUserAgreementManager.h
2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
//
// CNLiveUserAgreementManager.h
// CNLiveUserAgreementManager
//
// Created by 153993236@qq.com on 04/13/2019.
// Copyright (c) 2019 153993236@qq.com. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSUInteger, CNLiveGetAgreementH5Type) {
CNLiveUserAgreementUser = 1001,//用户协议
CNLiveUserAgreementPrivacy = 1002,//隐私政策
CNLiveUserAgreementAccountBinding = 1003,//账号绑定
CNLiveUserAgreementHelp = 1004,//帮助与反馈
CNLiveUserAgreementIntroduction = 1005,//应用简介
CNLiveUserAgreementPermission = 1006,//软件许可及服务协议
CNLiveUserAgreementQualificationInfo = 1007,//资质信息
CNLiveUserAgreementComplaints = 1008,//投诉
CNLiveUserAgreementReviewApply = 1009,//复核申请
CNLiveUserAgreementCancellation = 1010//注销须知
};
typedef void(^SuccessBlock)(NSString *h5, NSString *title, BOOL closeHidden);
typedef void(^FailureBlock)(NSError *error);
@interface CNLiveUserAgreementManager : NSObject
+ (instancetype)manager;
/**
* 请求协议并跳转
* @param string 类型字符串
*/
+ (void)jumpToAgreementH5WithString:(NSString *)string;
/**
* 类方法 请求协议
* @param string 类型字符串
* @param success 请求成功回调
* @param failure 请求失败回调
*/
+ (void)getAgreementH5WithString:(NSString *)string success:(SuccessBlock)success failure:(FailureBlock)failure;
/**
* 对象方法 请求协议
* @param string 类型字符串
* @param success 请求成功回调
* @param failure 请求失败回调
*/
- (void)getAgreementH5WithString:(NSString *)string success:(SuccessBlock)success failure:(FailureBlock)failure;
/**
* 请求协议并跳转
* @param type 类型
*/
+ (void)jumpToAgreementH5WithType:(CNLiveGetAgreementH5Type)type;
/**
* 类方法 请求协议
* @param type 类型
* @param success 请求成功回调
* @param failure 请求失败回调
*/
+ (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure;
/**
* 对象方法 请求协议
* @param type 类型
* @param success 请求成功回调
* @param failure 请求失败回调
*/
- (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure;
@end
NS_ASSUME_NONNULL_END