Commit e68ce758806afbfc2f42f12693300a4a19e285ac
1 parent
0f9b97ec
no message
Showing
7 changed files
with
32 additions
and
23 deletions
CNLiveEnvironment/Classes/CNLiveConst.h
| @@ -10,28 +10,21 @@ | @@ -10,28 +10,21 @@ | ||
| 10 | #define CNLiveConst_h | 10 | #define CNLiveConst_h |
| 11 | #import "CNLiveInterface.h" | 11 | #import "CNLiveInterface.h" |
| 12 | 12 | ||
| 13 | +//////////////////////////////////////////////////////// | ||
| 14 | +//////////// App | ||
| 15 | +//////////////////////////////////////////////////////// | ||
| 13 | // AppStore中AppID用于跳转AppStore下载/评分 | 16 | // AppStore中AppID用于跳转AppStore下载/评分 |
| 14 | #define AppStoreAppId @"1337575478" | 17 | #define AppStoreAppId @"1337575478" |
| 15 | 18 | ||
| 16 | // 请求查询app在AppStore的上架信息 | 19 | // 请求查询app在AppStore的上架信息 |
| 17 | #define AppStoreAppInfo @"https://itunes.apple.com/lookup?id=1337575478" | 20 | #define AppStoreAppInfo @"https://itunes.apple.com/lookup?id=1337575478" |
| 18 | 21 | ||
| 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:不显示欢迎页 | 22 | +// yes:显示欢迎页 no:不显示欢迎页 |
| 23 | +#define ShowGuideView @"no" | ||
| 24 | 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")//我的-投诉 | 25 | +//上传手机通讯录和 生成订单二维码时,DES加密key |
| 26 | +#define kUploadContactsKey @"cnliveIm" | ||
| 28 | 27 | ||
| 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 | //////////////////////////////////////////////////////// | 28 | //////////////////////////////////////////////////////// |
| 36 | //////////// 数据库---表名 | 29 | //////////// 数据库---表名 |
| 37 | //////////////////////////////////////////////////////// | 30 | //////////////////////////////////////////////////////// |
CNLiveEnvironment/Classes/CNLiveEnvironment.h
| @@ -46,6 +46,9 @@ | @@ -46,6 +46,9 @@ | ||
| 46 | // IM | 46 | // IM |
| 47 | #define IM_Cer_BusiId [CNLiveEnvironmentManager manager].kIM_Cer_BusiId | 47 | #define IM_Cer_BusiId [CNLiveEnvironmentManager manager].kIM_Cer_BusiId |
| 48 | 48 | ||
| 49 | +// IM请求Token | ||
| 50 | +#define TIM_GetTokenUrl [CNLiveEnvironmentManager manager].kTIM_GetTokenUrl | ||
| 51 | + | ||
| 49 | // 高德地图Key | 52 | // 高德地图Key |
| 50 | #define GDApiKey [CNLiveEnvironmentManager manager].kGDApiKey | 53 | #define GDApiKey [CNLiveEnvironmentManager manager].kGDApiKey |
| 51 | 54 | ||
| @@ -77,7 +80,7 @@ | @@ -77,7 +80,7 @@ | ||
| 77 | #define QQShareAppId_Share [CNLiveEnvironmentManager manager].kQQShareAppId_Share | 80 | #define QQShareAppId_Share [CNLiveEnvironmentManager manager].kQQShareAppId_Share |
| 78 | #define QQShareAppSecret_Share [CNLiveEnvironmentManager manager].kQQShareAppSecret_Share | 81 | #define QQShareAppSecret_Share [CNLiveEnvironmentManager manager].kQQShareAppSecret_Share |
| 79 | 82 | ||
| 80 | -/*shareSDK相关参数*/ | 83 | +/*ShareSDK相关参数*/ |
| 81 | #define ShareSDKAppId_Share [CNLiveEnvironmentManager manager].kShareSDKAppId_Share | 84 | #define ShareSDKAppId_Share [CNLiveEnvironmentManager manager].kShareSDKAppId_Share |
| 82 | #define ShareSDKAppSecret_Share [CNLiveEnvironmentManager manager].kShareSDKAppSecret_Share | 85 | #define ShareSDKAppSecret_Share [CNLiveEnvironmentManager manager].kShareSDKAppSecret_Share |
| 83 | 86 |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
| @@ -45,6 +45,7 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { | @@ -45,6 +45,7 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { | ||
| 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 | 47 | @property (nonatomic, assign, readonly) NSInteger kIM_Cer_BusiId; // IM |
| 48 | +@property (nonatomic, copy, readonly) NSString *kTIM_GetTokenUrl; // IM请求token | ||
| 48 | 49 | ||
| 49 | @property (nonatomic, copy, readonly) NSString *kGDApiKey; // 高德地图Key | 50 | @property (nonatomic, copy, readonly) NSString *kGDApiKey; // 高德地图Key |
| 50 | 51 |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
| @@ -33,6 +33,7 @@ | @@ -33,6 +33,7 @@ | ||
| 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 | 35 | @property (nonatomic, assign, readwrite) NSInteger kIM_Cer_BusiId; // IM |
| 36 | +@property (nonatomic, copy, readwrite) NSString *kTIM_GetTokenUrl; // IM请求token | ||
| 36 | 37 | ||
| 37 | @property (nonatomic, copy, readwrite) NSString *kGDApiKey; // 高德地图Key | 38 | @property (nonatomic, copy, readwrite) NSString *kGDApiKey; // 高德地图Key |
| 38 | 39 | ||
| @@ -149,6 +150,7 @@ | @@ -149,6 +150,7 @@ | ||
| 149 | #else | 150 | #else |
| 150 | manager.kIM_Cer_BusiId = 9205; | 151 | manager.kIM_Cer_BusiId = 9205; |
| 151 | #endif | 152 | #endif |
| 153 | + manager.kTIM_GetTokenUrl = @"https://imtest.cnlive.com/CnliveIM/notify/generateUserSign.action"; | ||
| 152 | 154 | ||
| 153 | manager.kGDApiKey = @"f4459435f1c756d2efedc6ceec12be63"; | 155 | manager.kGDApiKey = @"f4459435f1c756d2efedc6ceec12be63"; |
| 154 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; | 156 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; |
| @@ -219,6 +221,7 @@ | @@ -219,6 +221,7 @@ | ||
| 219 | #else | 221 | #else |
| 220 | manager.kIM_Cer_BusiId = 7347; | 222 | manager.kIM_Cer_BusiId = 7347; |
| 221 | #endif | 223 | #endif |
| 224 | + manager.kTIM_GetTokenUrl = @"https://api.cnlive.com/open/api2/im_chat/generateUserSign"; | ||
| 222 | 225 | ||
| 223 | manager.kGDApiKey = @"84d765606a54635aec2648f663d4a5ed"; | 226 | manager.kGDApiKey = @"84d765606a54635aec2648f663d4a5ed"; |
| 224 | manager.kTingYunAppKey = @"782d9a70547a4e3f91cb328b122bb85c"; | 227 | manager.kTingYunAppKey = @"782d9a70547a4e3f91cb328b122bb85c"; |
| @@ -288,6 +291,7 @@ | @@ -288,6 +291,7 @@ | ||
| 288 | #else | 291 | #else |
| 289 | manager.kIM_Cer_BusiId = 12451; | 292 | manager.kIM_Cer_BusiId = 12451; |
| 290 | #endif | 293 | #endif |
| 294 | + manager.kTIM_GetTokenUrl = @"https://imtest.cnlive.com/CnliveIM/notify/generateUserSign.action"; | ||
| 291 | 295 | ||
| 292 | manager.kGDApiKey = @"4b15525f4265edfed8dce1d02f08a893"; | 296 | manager.kGDApiKey = @"4b15525f4265edfed8dce1d02f08a893"; |
| 293 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; | 297 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; |
| @@ -356,6 +360,7 @@ | @@ -356,6 +360,7 @@ | ||
| 356 | #else | 360 | #else |
| 357 | manager.kIM_Cer_BusiId = 12453; | 361 | manager.kIM_Cer_BusiId = 12453; |
| 358 | #endif | 362 | #endif |
| 363 | + manager.kTIM_GetTokenUrl = @"https://api.cnlive.com/open/api2/im_chat/generateUserSign"; | ||
| 359 | 364 | ||
| 360 | manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02"; | 365 | manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02"; |
| 361 | manager.kTingYunAppKey = @"37c9ea3f439145269e5cffe095466b17"; | 366 | manager.kTingYunAppKey = @"37c9ea3f439145269e5cffe095466b17"; |
CNLiveEnvironment/Classes/CNLiveInterface.h
| @@ -18,9 +18,16 @@ | @@ -18,9 +18,16 @@ | ||
| 18 | #define cn_API_OpenApi2(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_OpenApi2,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] | 19 | #define cn_API_Classify(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Classify,url] |
| 20 | 20 | ||
| 21 | +// 分享使用到的logo图片 | ||
| 22 | +#define NetAddShareImgUrl cn_WjjH5_Host(@"/static/logo.png") | ||
| 23 | +#define WjjH5Short_Host @"http://dwz.cnlive.com" | ||
| 24 | + | ||
| 25 | +//我的-投诉 | ||
| 26 | +#define WjjH5_Complaint cn_WjjH5_Host(@"/cnComplaint.html") | ||
| 27 | + | ||
| 28 | +// 网++默认头像地址 | ||
| 29 | +#define CNLiveNetAddDefaultHead cn_API_Refund(@"/admin/test/head.png") | ||
| 21 | 30 | ||
| 22 | -//上传手机通讯录和 生成订单二维码时,DES加密key | ||
| 23 | -#define kUploadContactsKey @"cnliveIm" | ||
| 24 | 31 | ||
| 25 | #define iUploadContacts cn_API_Contact(@"/CnliveIM/notify/uploadContacts.action") | 32 | #define iUploadContacts cn_API_Contact(@"/CnliveIM/notify/uploadContacts.action") |
| 26 | //其他投诉 | 33 | //其他投诉 |
Example/CNLiveEnvironment/XWAppDelegate.m
| @@ -22,8 +22,7 @@ | @@ -22,8 +22,7 @@ | ||
| 22 | // NSLog(@"%@",APPKey); | 22 | // NSLog(@"%@",APPKey); |
| 23 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); | 23 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 24 | // NSLog(@"%@",CNGetWitnessCancelCollection); | 24 | // NSLog(@"%@",CNGetWitnessCancelCollection); |
| 25 | -// NSLog(@"%@",cn_API_Host(@"/我爱中国")); | ||
| 26 | - NSLog(@"%@",WjjH5_VideoChina); | 25 | + NSLog(@"%@",cn_API_Host(@"/我爱中国")); |
| 27 | 26 | ||
| 28 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; | 27 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; |
| 29 | // NSLog(@"%@",EnvironmentDesc); | 28 | // NSLog(@"%@",EnvironmentDesc); |
| @@ -34,9 +33,7 @@ | @@ -34,9 +33,7 @@ | ||
| 34 | // NSLog(@"%@",APPKey); | 33 | // NSLog(@"%@",APPKey); |
| 35 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); | 34 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 36 | // NSLog(@"%@",CNGetWitnessCancelCollection); | 35 | // NSLog(@"%@",CNGetWitnessCancelCollection); |
| 37 | -// NSLog(@"%@",cn_API_Host(@"/我爱中国")); | ||
| 38 | - | ||
| 39 | - NSLog(@"%@",WjjH5_VideoChina); | 36 | + NSLog(@"%@",cn_API_Host(@"/我爱中国")); |
| 40 | 37 | ||
| 41 | 38 | ||
| 42 | 39 |
Example/CNLiveEnvironment/XWViewController.m
| @@ -22,7 +22,10 @@ | @@ -22,7 +22,10 @@ | ||
| 22 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; | 22 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; |
| 23 | NSLog(@"%@",CNStockDarenVideoCallBackUrl); | 23 | NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 24 | NSLog(@"%@",CNGetWitnessCancelCollection); | 24 | NSLog(@"%@",CNGetWitnessCancelCollection); |
| 25 | - NSLog(@"%@",CNGetSpAddFollowsUrl); | 25 | + NSLog(@"%@",NetAddShareImgUrl); |
| 26 | + | ||
| 27 | + | ||
| 28 | + NSLog(@"%@",TIM_GetTokenUrl); | ||
| 26 | 29 | ||
| 27 | 30 | ||
| 28 | } | 31 | } |