Commit f1cf075012d8e2b6303b4ae25b184e6a4eac2733

Authored by iOS-Xiaowen
1 parent d91ebda0

no message

CNLiveBUserAgreement/Classes/CNLiveUserAgreementManager.h
... ... @@ -13,19 +13,15 @@ NS_ASSUME_NONNULL_BEGIN
13 13 typedef NS_ENUM(NSUInteger, CNLiveGetAgreementH5Type) {
14 14 CNLiveUserAgreementUser = 1001,//用户协议
15 15 CNLiveUserAgreementPrivacy = 1002,//隐私政策
16   - CNLiveUserAgreementHelp = 1003,//帮助与反馈
17   - CNLiveUserAgreementUnderstand = 1004,//使用手册
  16 + CNLiveUserAgreementAccountBinding = 1003,//账号绑定
  17 + CNLiveUserAgreementHelp = 1004,//帮助与反馈
18 18 CNLiveUserAgreementIntroduction = 1005,//应用简介
19   - CNLiveUserAgreementCopyright = 1006,//版权信息
20   - CNLiveUserAgreementPermission = 1007,//软件许可及服务协议
21   -// CNLiveUserAgreementIntegralRules = 1008,//积分规则
22   -// CNLiveUserAgreementSigninRules = 1009,//签到奖励规则
23   - CNLiveUserAgreementReviewApply = 1010,//复核申请
24   - CNLiveUserAgreementCancellation = 1011,//注销协议
25   -// CNLiveUserAgreementEmojiService = 1012,//表情包服务说明
26   -// CNLiveUserAgreementEmojiComplaints = 1013,//表情包投诉说明
27   - CNLiveUserAgreementEnterpriseQualification = 1014,//企业资质
28   -// CNLiveUserAgreementBuyAudio = 1015 //购买音频协议
  19 +
  20 + CNLiveUserAgreementPermission = 1006,//软件许可及服务协议
  21 + CNLiveUserAgreementQualificationInfo = 1007,//资质信息
  22 + CNLiveUserAgreementComplaints = 1008,//投诉
  23 + CNLiveUserAgreementReviewApply = 1009,//复核申请
  24 + CNLiveUserAgreementCancellation = 1010//注销须知
29 25  
30 26 };
31 27  
... ...
CNLiveBUserAgreement/Classes/CNLiveUserAgreementManager.m
... ... @@ -53,9 +53,21 @@ static CNLiveUserAgreementManager *_instance = nil;
53 53 * @param success 请求成功回调
54 54 * @param failure 请求失败回调
55 55 */
  56 +
  57 +//CNLiveUserAgreementUser = 1001,//用户协议
  58 +//CNLiveUserAgreementPrivacy = 1002,//隐私政策
  59 +//CNLiveUserAgreementAccountBinding = 1003,//账号绑定
  60 +//CNLiveUserAgreementHelp = 1004,//帮助与反馈
  61 +//CNLiveUserAgreementIntroduction = 1005,//应用简介
  62 +//
  63 +//CNLiveUserAgreementPermission = 1006,//软件许可及服务协议
  64 +//CNLiveUserAgreementQualificationInfo = 1007,//资质信息
  65 +//CNLiveUserAgreementComplaints = 1008,//投诉
  66 +//CNLiveUserAgreementReviewApply = 1009,//复核申请
  67 +//CNLiveUserAgreementCancellation = 1010//注销须知
56 68 - (void)getAgreementH5WithType:(CNLiveGetAgreementH5Type)type success:(SuccessBlock)success failure:(FailureBlock)failure {
57 69 [CNLiveNetworking setAllowRequestDefaultArgument:NO];
58   - [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:@"https://wjj.ys1.cnliveimg.com/json/wjj_user_terms.json" Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
  70 + [CNLiveNetworking requestNetworkWithMethod:CNLiveRequestMethodGET URLString:@"http://wjj.ys1.cnliveimg.com/json/wjj_live_terms.json" Param:@{} CacheType:CNLiveNetworkCacheTypeNetworkOnly CompletionBlock:^(NSURLSessionTask *requestTask, id responseObject, NSError *error) {
59 71 if (error) {
60 72 if (failure) {
61 73 failure(error);
... ... @@ -87,9 +99,9 @@ static CNLiveUserAgreementManager *_instance = nil;
87 99 }
88 100 }
89 101 break;
90   - case CNLiveUserAgreementHelp:
  102 + case CNLiveUserAgreementAccountBinding:
91 103 {
92   - if ([[NSString stringWithFormat:@"%@",dic[@"type"]] isEqualToString:@"bzfk"]) {
  104 + if ([[NSString stringWithFormat:@"%@",dic[@"type"]] isEqualToString:@"bdqrs"]) {
93 105 if (success) {
94 106 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
95 107 return ;
... ... @@ -97,9 +109,9 @@ static CNLiveUserAgreementManager *_instance = nil;
97 109 }
98 110 }
99 111 break;
100   - case CNLiveUserAgreementUnderstand:
  112 + case CNLiveUserAgreementHelp:
101 113 {
102   - if ([[NSString stringWithFormat:@"%@",dic[@"type"]] isEqualToString:@"ljwjj"]) {
  114 + if ([[NSString stringWithFormat:@"%@",dic[@"type"]] isEqualToString:@"bzfk"]) {
103 115 if (success) {
104 116 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
105 117 return ;
... ... @@ -117,9 +129,9 @@ static CNLiveUserAgreementManager *_instance = nil;
117 129 }
118 130 }
119 131 break;
120   - case CNLiveUserAgreementCopyright:
  132 + case CNLiveUserAgreementPermission:
121 133 {
122   - if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"bqxx"]) {
  134 + if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"rjxkfwxy"]) {
123 135 if (success) {
124 136 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
125 137 return ;
... ... @@ -127,9 +139,9 @@ static CNLiveUserAgreementManager *_instance = nil;
127 139 }
128 140 }
129 141 break;
130   - case CNLiveUserAgreementPermission:
  142 + case CNLiveUserAgreementQualificationInfo:
131 143 {
132   - if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"rjxkxy"]) {
  144 + if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"zzxx"]) {
133 145 if (success) {
134 146 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
135 147 return ;
... ... @@ -137,9 +149,9 @@ static CNLiveUserAgreementManager *_instance = nil;
137 149 }
138 150 }
139 151 break;
140   - case CNLiveUserAgreementReviewApply:
  152 + case CNLiveUserAgreementComplaints:
141 153 {
142   - if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"shsqxy"]) {
  154 + if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"complaint"]) {
143 155 if (success) {
144 156 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
145 157 return ;
... ... @@ -147,9 +159,9 @@ static CNLiveUserAgreementManager *_instance = nil;
147 159 }
148 160 }
149 161 break;
150   - case CNLiveUserAgreementCancellation:
  162 + case CNLiveUserAgreementReviewApply:
151 163 {
152   - if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"zxxz"]) {
  164 + if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"shsq"]) {
153 165 if (success) {
154 166 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
155 167 return ;
... ... @@ -157,9 +169,9 @@ static CNLiveUserAgreementManager *_instance = nil;
157 169 }
158 170 }
159 171 break;
160   - case CNLiveUserAgreementEnterpriseQualification:
  172 + case CNLiveUserAgreementCancellation:
161 173 {
162   - if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"qyzz"]) {
  174 + if ([[NSString stringWithFormat:@"%@", dic[@"type"]] isEqualToString:@"bzxxz"]) {
163 175 if (success) {
164 176 success(dic[@"detailUrl"], dic[@"title"], closeHidden);
165 177 return ;
... ...
Example/CNLiveBUserAgreement/CNLIVEViewController.m
... ... @@ -32,7 +32,7 @@
32 32 }
33 33  
34 34 - (void)testButtonClicked {
35   - [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementUnderstand];
  35 + [CNLiveUserAgreementManager jumpToAgreementH5WithType:CNLiveUserAgreementPrivacy];
36 36  
37 37 }
38 38  
... ...