Commit 58aedf1790768a1e8382fc3f9b675d874687b084

Authored by zhangxiaowen
1 parent 3b5ad178

no message

CNLiveEnvironment/Classes/CNLiveConst.h 0 → 100644
  1 +//
  2 +// CNLiveConst.h
  3 +// XWTest
  4 +//
  5 +// Created by CNLive-zxw on 2019/7/13.
  6 +// Copyright © 2019 CNLive. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CNLiveConst_h
  10 +#define CNLiveConst_h
  11 +#import "CNLiveInterface.h"
  12 +
  13 +// AppStore中AppID用于跳转AppStore下载/评分
  14 +#define AppStoreAppId @"1337575478"
  15 +
  16 +// 请求查询app在AppStore的上架信息
  17 +#define AppStoreAppInfo @"https://itunes.apple.com/lookup?id=1337575478"
  18 +
  19 +// h5新闻详情中分享使用到的图片地址
  20 +#define netAddShareImgUrl cn_WjjH5_Host(@"/static/logo.png")
  21 +#define WjjH5Short_Host @"http://dwz.cnlive.com"
  22 +
  23 +#define ShowGuideView @"no" // yes:显示欢迎页 no:不显示欢迎页
  24 +
  25 +#define WjjH5_VideoChina cn_WjjH5_Host(@"/cnnews.html")
  26 +#define WjjH5_NumProduct cn_WjjH5_Host(@"/cndr.html")
  27 +#define WjjH5_Complaint cn_WjjH5_Host(@"/cnComplaint.html")//我的-投诉
  28 +
  29 +#define TIM_GetTokenUrl cn_API_OpenApi2(@"/im_chat/generateUserSign")
  30 +
  31 +// 网++默认头像地址
  32 +#define CNLiveNetAddDefaultHead cn_API_Refund(@"/admin/test/head.png")
  33 +
  34 +//
  35 +////////////////////////////////////////////////////////
  36 +//////////// 数据库---表名
  37 +////////////////////////////////////////////////////////
  38 +
  39 +//达人个人主页表名
  40 +#define DarenHomeRealm @"DarenHome"
  41 +
  42 +//达人列表表名
  43 +#define DarenSubsRealm @"DarenSubs"
  44 +
  45 +//生活列表表名
  46 +#define LifeSubsRealm @"LifeSubs"
  47 +
  48 +//系统订单列表表名
  49 +#define LifeHomeRealm @"LifeHome"
  50 +
  51 +//朋友圈新消息表名
  52 +#define MomentNewMsgRealm @"MomentNewMsg"
  53 +
  54 +
  55 +#endif /* CNLiveConst_h */
CNLiveEnvironment/Classes/CNLiveEnvironment.h
@@ -8,8 +8,8 @@ @@ -8,8 +8,8 @@
8 8
9 #ifndef CNLiveEnvironment_h 9 #ifndef CNLiveEnvironment_h
10 #define CNLiveEnvironment_h 10 #define CNLiveEnvironment_h
11 -  
12 #import "CNLiveInterface.h" 11 #import "CNLiveInterface.h"
  12 +#import "CNLiveConst.h"
13 13
14 // 详细环境 14 // 详细环境
15 #define EnvironmentType [CNLiveEnvironmentManager manager].isEnvironment 15 #define EnvironmentType [CNLiveEnvironmentManager manager].isEnvironment
@@ -43,6 +43,9 @@ @@ -43,6 +43,9 @@
43 // App展示名字 43 // App展示名字
44 #define DisplayName [CNLiveEnvironmentManager manager].displayName 44 #define DisplayName [CNLiveEnvironmentManager manager].displayName
45 45
  46 +// IM
  47 +#define IM_Cer_busiId [CNLiveEnvironmentManager manager].kIM_Cer_busiId
  48 +
46 // 高德地图Key 49 // 高德地图Key
47 #define GDApiKey [CNLiveEnvironmentManager manager].kGDApiKey 50 #define GDApiKey [CNLiveEnvironmentManager manager].kGDApiKey
48 51
@@ -59,6 +62,13 @@ @@ -59,6 +62,13 @@
59 // tingyun 62 // tingyun
60 #define TingYunAppKey [CNLiveEnvironmentManager manager].kTingYunAppKey 63 #define TingYunAppKey [CNLiveEnvironmentManager manager].kTingYunAppKey
61 64
  65 +//七牛上传图片/视频
  66 +#define API_BucketName [CNLiveEnvironmentManager manager].kBucketName
  67 +#define API_PhotoUrl [CNLiveEnvironmentManager manager].kPhotoUrl
  68 +
  69 +#define MultipleCategory [CNLiveEnvironmentManager manager].kMultipleCategory
  70 +#define WitnessMultipleCategory [CNLiveEnvironmentManager manager].kWitnessMultipleCategory
  71 +
62 /*微信相关参数*/ 72 /*微信相关参数*/
63 #define WeiChatAppId_Share [CNLiveEnvironmentManager manager].kWeiChatAppId_Share 73 #define WeiChatAppId_Share [CNLiveEnvironmentManager manager].kWeiChatAppId_Share
64 #define WeiChatAppSecret_Share [CNLiveEnvironmentManager manager].kWeiChatAppSecret_Share 74 #define WeiChatAppSecret_Share [CNLiveEnvironmentManager manager].kWeiChatAppSecret_Share
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
@@ -44,6 +44,8 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { @@ -44,6 +44,8 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) {
44 44
45 @property (nonatomic, copy, readonly) NSString *displayName; // 展示名字 45 @property (nonatomic, copy, readonly) NSString *displayName; // 展示名字
46 46
  47 +@property (nonatomic, assign, readonly) NSInteger kIM_Cer_busiId; // IM
  48 +
47 @property (nonatomic, copy, readonly) NSString *kGDApiKey; // 高德地图Key 49 @property (nonatomic, copy, readonly) NSString *kGDApiKey; // 高德地图Key
48 50
49 @property (nonatomic, copy, readonly) NSString *kBDAppId; // 百度身份证识别 51 @property (nonatomic, copy, readonly) NSString *kBDAppId; // 百度身份证识别
@@ -56,6 +58,12 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { @@ -56,6 +58,12 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) {
56 58
57 @property (nonatomic, copy, readonly) NSString *kTingYunAppKey; //tingyun 59 @property (nonatomic, copy, readonly) NSString *kTingYunAppKey; //tingyun
58 60
  61 +@property (nonatomic, copy, readonly) NSString *kBucketName; //七牛上传
  62 +@property (nonatomic, copy, readonly) NSString *kPhotoUrl; //七牛上传
  63 +@property (nonatomic, assign, readonly) NSInteger kMultipleCategory; //七牛上传
  64 +@property (nonatomic, assign, readonly) NSInteger kWitnessMultipleCategory; //七牛上传
  65 +
  66 +
59 /*微信相关参数*/ 67 /*微信相关参数*/
60 @property (nonatomic, copy, readonly) NSString *kWeiChatAppId_Share; 68 @property (nonatomic, copy, readonly) NSString *kWeiChatAppId_Share;
61 @property (nonatomic, copy, readonly) NSString *kWeiChatAppSecret_Share; 69 @property (nonatomic, copy, readonly) NSString *kWeiChatAppSecret_Share;
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
@@ -32,6 +32,8 @@ @@ -32,6 +32,8 @@
32 32
33 @property (nonatomic, copy, readwrite) NSString *displayName; //App展示名字 33 @property (nonatomic, copy, readwrite) NSString *displayName; //App展示名字
34 34
  35 +@property (nonatomic, assign, readwrite) NSInteger kIM_Cer_busiId; // IM
  36 +
35 @property (nonatomic, copy, readwrite) NSString *kGDApiKey; // 高德地图Key 37 @property (nonatomic, copy, readwrite) NSString *kGDApiKey; // 高德地图Key
36 38
37 @property (nonatomic, copy, readwrite) NSString *kBDAppId; //百度身份证识别 39 @property (nonatomic, copy, readwrite) NSString *kBDAppId; //百度身份证识别
@@ -44,6 +46,11 @@ @@ -44,6 +46,11 @@
44 46
45 @property (nonatomic, copy, readwrite) NSString *kTingYunAppKey; //tingyun 47 @property (nonatomic, copy, readwrite) NSString *kTingYunAppKey; //tingyun
46 48
  49 +@property (nonatomic, copy, readwrite) NSString *kBucketName; //七牛上传
  50 +@property (nonatomic, copy, readwrite) NSString *kPhotoUrl; //七牛上传
  51 +@property (nonatomic, assign, readwrite) NSInteger kMultipleCategory; //七牛上传
  52 +@property (nonatomic, assign, readwrite) NSInteger kWitnessMultipleCategory; //七牛上传
  53 +
47 /*微信相关参数*/ 54 /*微信相关参数*/
48 @property (nonatomic, copy, readwrite) NSString *kWeiChatAppId_Share; 55 @property (nonatomic, copy, readwrite) NSString *kWeiChatAppId_Share;
49 @property (nonatomic, copy, readwrite) NSString *kWeiChatAppSecret_Share; 56 @property (nonatomic, copy, readwrite) NSString *kWeiChatAppSecret_Share;
@@ -137,9 +144,20 @@ @@ -137,9 +144,20 @@
137 144
138 manager.displayName = @"网家家测试企业"; 145 manager.displayName = @"网家家测试企业";
139 146
  147 +#if DEBUG
  148 + manager.kIM_Cer_busiId = 9204;
  149 +#else
  150 + manager.kIM_Cer_busiId = 9205;
  151 +#endif
  152 +
140 manager.kGDApiKey = @"f4459435f1c756d2efedc6ceec12be63"; 153 manager.kGDApiKey = @"f4459435f1c756d2efedc6ceec12be63";
141 manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; 154 manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352";
142 155
  156 + manager.kBucketName = @"mam-wjjtest-802";
  157 + manager.kPhotoUrl = @"http://wjjtest.ys2.cnliveimg.com/";
  158 + manager.kMultipleCategory = 371;
  159 + manager.kWitnessMultipleCategory = 375;
  160 +
143 manager.kBDAppId = @"14435716"; 161 manager.kBDAppId = @"14435716";
144 manager.kBDAppKey = @"4foSD6VBILQ61olzmVAFEVGZ"; 162 manager.kBDAppKey = @"4foSD6VBILQ61olzmVAFEVGZ";
145 manager.kBDSecret = @"VEuz92EVrmEVrrgTZKxYo4ApUkol7Ptk"; 163 manager.kBDSecret = @"VEuz92EVrmEVrrgTZKxYo4ApUkol7Ptk";
@@ -196,9 +214,20 @@ @@ -196,9 +214,20 @@
196 214
197 manager.displayName = @"网家家正式企业"; 215 manager.displayName = @"网家家正式企业";
198 216
  217 +#if DEBUG
  218 + manager.kIM_Cer_busiId = 7346;
  219 +#else
  220 + manager.kIM_Cer_busiId = 7347;
  221 +#endif
  222 +
199 manager.kGDApiKey = @"84d765606a54635aec2648f663d4a5ed"; 223 manager.kGDApiKey = @"84d765606a54635aec2648f663d4a5ed";
200 manager.kTingYunAppKey = @"782d9a70547a4e3f91cb328b122bb85c"; 224 manager.kTingYunAppKey = @"782d9a70547a4e3f91cb328b122bb85c";
201 225
  226 + manager.kBucketName = @"mam-wjj-769";
  227 + manager.kPhotoUrl = @"http://wjj.ys2.cnliveimg.com/";
  228 + manager.kMultipleCategory = 366;
  229 + manager.kWitnessMultipleCategory = 370;
  230 +
202 manager.kBDAppId = @"14380872"; 231 manager.kBDAppId = @"14380872";
203 manager.kBDAppKey = @"ibl8vbKkPVYBw5IOvR8tVGGo"; 232 manager.kBDAppKey = @"ibl8vbKkPVYBw5IOvR8tVGGo";
204 manager.kBDSecret = @"QEd6n1qruIGG8AYkyLyqepksO2uUe0GK"; 233 manager.kBDSecret = @"QEd6n1qruIGG8AYkyLyqepksO2uUe0GK";
@@ -253,10 +282,21 @@ @@ -253,10 +282,21 @@
253 manager.appSecret = @"b9064cfe0a030b8b20c061fc0ee3c16acce7757874b7a2"; 282 manager.appSecret = @"b9064cfe0a030b8b20c061fc0ee3c16acce7757874b7a2";
254 283
255 manager.displayName = @"网家家测试商店"; 284 manager.displayName = @"网家家测试商店";
  285 +
  286 +#if DEBUG
  287 + manager.kIM_Cer_busiId = 12450;
  288 +#else
  289 + manager.kIM_Cer_busiId = 12451;
  290 +#endif
256 291
257 manager.kGDApiKey = @"4b15525f4265edfed8dce1d02f08a893"; 292 manager.kGDApiKey = @"4b15525f4265edfed8dce1d02f08a893";
258 manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; 293 manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352";
259 294
  295 + manager.kBucketName = @"mam-wjjtest-802";
  296 + manager.kPhotoUrl = @"http://wjjtest.ys2.cnliveimg.com/";
  297 + manager.kMultipleCategory = 371;
  298 + manager.kWitnessMultipleCategory = 375;
  299 +
260 manager.kBDAppId = @"14435697"; 300 manager.kBDAppId = @"14435697";
261 manager.kBDAppKey = @"3LqIXy2AtXxrxyFM8N73QGYN"; 301 manager.kBDAppKey = @"3LqIXy2AtXxrxyFM8N73QGYN";
262 manager.kBDSecret = @"EKZxZza8purqGHOmngkMi7awtZkm0lOW"; 302 manager.kBDSecret = @"EKZxZza8purqGHOmngkMi7awtZkm0lOW";
@@ -311,10 +351,20 @@ @@ -311,10 +351,20 @@
311 manager.appSecret = @"275e8dc29274a1186d82f65bc607c231d02bcb3bfd8976"; 351 manager.appSecret = @"275e8dc29274a1186d82f65bc607c231d02bcb3bfd8976";
312 352
313 manager.displayName = @"网家家"; 353 manager.displayName = @"网家家";
  354 +#if DEBUG
  355 + manager.kIM_Cer_busiId = 12452;
  356 +#else
  357 + manager.kIM_Cer_busiId = 12453;
  358 +#endif
314 359
315 manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02"; 360 manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02";
316 manager.kTingYunAppKey = @"37c9ea3f439145269e5cffe095466b17"; 361 manager.kTingYunAppKey = @"37c9ea3f439145269e5cffe095466b17";
317 362
  363 + manager.kBucketName = @"mam-wjj-769";
  364 + manager.kPhotoUrl = @"http://wjj.ys2.cnliveimg.com/";
  365 + manager.kMultipleCategory = 366;
  366 + manager.kWitnessMultipleCategory = 370;
  367 +
318 manager.kBDAppId = @"14380860"; 368 manager.kBDAppId = @"14380860";
319 manager.kBDAppKey = @"4bX1eK7SiCL461QBnRKilowc"; 369 manager.kBDAppKey = @"4bX1eK7SiCL461QBnRKilowc";
320 manager.kBDSecret = @"BTzXLoPbUjlLeOM1nHnfOuTB9q18YZVq"; 370 manager.kBDSecret = @"BTzXLoPbUjlLeOM1nHnfOuTB9q18YZVq";
CNLiveEnvironment/Classes/CNLiveInterface.h
@@ -10,13 +10,13 @@ @@ -10,13 +10,13 @@
10 #define CNLiveInterface_h 10 #define CNLiveInterface_h
11 #import "CNLiveEnvironmentManager.h" 11 #import "CNLiveEnvironmentManager.h"
12 12
13 -#define cn_WjjH5_Host(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kWjjH5_Host,url]  
14 -#define cn_API_Host(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Host,url]  
15 -#define cn_API_Contact(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Contact,url]  
16 -#define cn_API_Refund(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Refund,url]  
17 -#define cn_API_Report(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Report,url]  
18 -#define cn_API_OpenApi2(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_OpenApi2,url]  
19 -#define cn_API_Classify(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Classify,url] 13 +#define cn_WjjH5_Host(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kWjjH5_Host,url]
  14 +#define cn_API_Host(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Host,url]
  15 +#define cn_API_Contact(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Contact,url]
  16 +#define cn_API_Refund(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Refund,url]
  17 +#define cn_API_Report(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Report,url]
  18 +#define cn_API_OpenApi2(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_OpenApi2,url]
  19 +#define cn_API_Classify(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Classify,url]
20 20
21 21
22 //上传手机通讯录和 生成订单二维码时,DES加密key 22 //上传手机通讯录和 生成订单二维码时,DES加密key
@@ -630,25 +630,6 @@ @@ -630,25 +630,6 @@
630 #define CNDelnolookfsids cn_API_Host(@"/Daren/moment/delNoLookFsids.action") 630 #define CNDelnolookfsids cn_API_Host(@"/Daren/moment/delNoLookFsids.action")
631 //不看他的列表 631 //不看他的列表
632 #define CNGetnolookfsids cn_API_Host(@"/Daren/moment/getNoLookFsids.action") 632 #define CNGetnolookfsids cn_API_Host(@"/Daren/moment/getNoLookFsids.action")
633 -//  
634 -////////////////////////////////////////////////////////  
635 -//////////// 数据库---表名  
636 -////////////////////////////////////////////////////////  
637 -  
638 -//达人个人主页表名  
639 -#define DarenHomeRealm @"DarenHome"  
640 -  
641 -//达人列表表名  
642 -#define DarenSubsRealm @"DarenSubs"  
643 -  
644 -//生活列表表名  
645 -#define LifeSubsRealm @"LifeSubs"  
646 -  
647 -//系统订单列表表名  
648 -#define LifeHomeRealm @"LifeHome"  
649 -  
650 -//朋友圈新消息表名  
651 -#define MomentNewMsgRealm @"MomentNewMsg"  
652 633
653 634
654 #endif /* CNLiveInterface_h */ 635 #endif /* CNLiveInterface_h */
Example/CNLiveEnvironment/XWAppDelegate.m
@@ -14,25 +14,29 @@ @@ -14,25 +14,29 @@
14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 { 15 {
16 // Override point for customization after application launch. 16 // Override point for customization after application launch.
17 - NSLog(@"%@",EnvironmentDesc);  
18 - NSLog(@"%@",ShareSDKAppId_Share);  
19 - NSLog(@"%d",TestEnvironment);  
20 - NSLog(@"%@",cn_API_Host(@"asd"));  
21 - NSLog(@"%@",AppId);  
22 - NSLog(@"%@",APPKey);  
23 - NSLog(@"%@",CNStockDarenVideoCallBackUrl);  
24 - NSLog(@"%@",CNGetWitnessCancelCollection);  
25 - NSLog(@"%@",cn_API_Host(@"/我爱中国")); 17 +// NSLog(@"%@",EnvironmentDesc);
  18 +// NSLog(@"%@",ShareSDKAppId_Share);
  19 +// NSLog(@"%d",TestEnvironment);
  20 +// NSLog(@"%@",cn_API_Host(@"asd"));
  21 +// NSLog(@"%@",AppId);
  22 +// NSLog(@"%@",APPKey);
  23 +// NSLog(@"%@",CNStockDarenVideoCallBackUrl);
  24 +// NSLog(@"%@",CNGetWitnessCancelCollection);
  25 +// NSLog(@"%@",cn_API_Host(@"/我爱中国"));
  26 + NSLog(@"%@",WjjH5_VideoChina);
  27 +
26 [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; 28 [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore];
27 - NSLog(@"%@",EnvironmentDesc);  
28 - NSLog(@"%@",ShareSDKAppId_Share);  
29 - NSLog(@"%d",TestEnvironment);  
30 - NSLog(@"%@",cn_API_Host(@"asd"));  
31 - NSLog(@"%@",AppId);  
32 - NSLog(@"%@",APPKey);  
33 - NSLog(@"%@",CNStockDarenVideoCallBackUrl);  
34 - NSLog(@"%@",CNGetWitnessCancelCollection);  
35 - NSLog(@"%@",cn_API_Host(@"/我爱中国")); 29 +// NSLog(@"%@",EnvironmentDesc);
  30 +// NSLog(@"%@",ShareSDKAppId_Share);
  31 +// NSLog(@"%d",TestEnvironment);
  32 +// NSLog(@"%@",cn_API_Host(@"asd"));
  33 +// NSLog(@"%@",AppId);
  34 +// NSLog(@"%@",APPKey);
  35 +// NSLog(@"%@",CNStockDarenVideoCallBackUrl);
  36 +// NSLog(@"%@",CNGetWitnessCancelCollection);
  37 +// NSLog(@"%@",cn_API_Host(@"/我爱中国"));
  38 +
  39 + NSLog(@"%@",WjjH5_VideoChina);
36 40
37 41
38 42