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 | 10 | #define CNLiveConst_h |
| 11 | 11 | #import "CNLiveInterface.h" |
| 12 | 12 | |
| 13 | +//////////////////////////////////////////////////////// | |
| 14 | +//////////// App | |
| 15 | +//////////////////////////////////////////////////////// | |
| 13 | 16 | // AppStore中AppID用于跳转AppStore下载/评分 |
| 14 | 17 | #define AppStoreAppId @"1337575478" |
| 15 | 18 | |
| 16 | 19 | // 请求查询app在AppStore的上架信息 |
| 17 | 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 | 46 | // IM |
| 47 | 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 | 52 | // 高德地图Key |
| 50 | 53 | #define GDApiKey [CNLiveEnvironmentManager manager].kGDApiKey |
| 51 | 54 | |
| ... | ... | @@ -77,7 +80,7 @@ |
| 77 | 80 | #define QQShareAppId_Share [CNLiveEnvironmentManager manager].kQQShareAppId_Share |
| 78 | 81 | #define QQShareAppSecret_Share [CNLiveEnvironmentManager manager].kQQShareAppSecret_Share |
| 79 | 82 | |
| 80 | -/*shareSDK相关参数*/ | |
| 83 | +/*ShareSDK相关参数*/ | |
| 81 | 84 | #define ShareSDKAppId_Share [CNLiveEnvironmentManager manager].kShareSDKAppId_Share |
| 82 | 85 | #define ShareSDKAppSecret_Share [CNLiveEnvironmentManager manager].kShareSDKAppSecret_Share |
| 83 | 86 | ... | ... |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
| ... | ... | @@ -45,6 +45,7 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { |
| 45 | 45 | @property (nonatomic, copy, readonly) NSString *displayName; // 展示名字 |
| 46 | 46 | |
| 47 | 47 | @property (nonatomic, assign, readonly) NSInteger kIM_Cer_BusiId; // IM |
| 48 | +@property (nonatomic, copy, readonly) NSString *kTIM_GetTokenUrl; // IM请求token | |
| 48 | 49 | |
| 49 | 50 | @property (nonatomic, copy, readonly) NSString *kGDApiKey; // 高德地图Key |
| 50 | 51 | ... | ... |
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
| ... | ... | @@ -33,6 +33,7 @@ |
| 33 | 33 | @property (nonatomic, copy, readwrite) NSString *displayName; //App展示名字 |
| 34 | 34 | |
| 35 | 35 | @property (nonatomic, assign, readwrite) NSInteger kIM_Cer_BusiId; // IM |
| 36 | +@property (nonatomic, copy, readwrite) NSString *kTIM_GetTokenUrl; // IM请求token | |
| 36 | 37 | |
| 37 | 38 | @property (nonatomic, copy, readwrite) NSString *kGDApiKey; // 高德地图Key |
| 38 | 39 | |
| ... | ... | @@ -149,6 +150,7 @@ |
| 149 | 150 | #else |
| 150 | 151 | manager.kIM_Cer_BusiId = 9205; |
| 151 | 152 | #endif |
| 153 | + manager.kTIM_GetTokenUrl = @"https://imtest.cnlive.com/CnliveIM/notify/generateUserSign.action"; | |
| 152 | 154 | |
| 153 | 155 | manager.kGDApiKey = @"f4459435f1c756d2efedc6ceec12be63"; |
| 154 | 156 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; |
| ... | ... | @@ -219,6 +221,7 @@ |
| 219 | 221 | #else |
| 220 | 222 | manager.kIM_Cer_BusiId = 7347; |
| 221 | 223 | #endif |
| 224 | + manager.kTIM_GetTokenUrl = @"https://api.cnlive.com/open/api2/im_chat/generateUserSign"; | |
| 222 | 225 | |
| 223 | 226 | manager.kGDApiKey = @"84d765606a54635aec2648f663d4a5ed"; |
| 224 | 227 | manager.kTingYunAppKey = @"782d9a70547a4e3f91cb328b122bb85c"; |
| ... | ... | @@ -288,6 +291,7 @@ |
| 288 | 291 | #else |
| 289 | 292 | manager.kIM_Cer_BusiId = 12451; |
| 290 | 293 | #endif |
| 294 | + manager.kTIM_GetTokenUrl = @"https://imtest.cnlive.com/CnliveIM/notify/generateUserSign.action"; | |
| 291 | 295 | |
| 292 | 296 | manager.kGDApiKey = @"4b15525f4265edfed8dce1d02f08a893"; |
| 293 | 297 | manager.kTingYunAppKey = @"3dda66ec904a4c3a8ad0169ca74de352"; |
| ... | ... | @@ -356,6 +360,7 @@ |
| 356 | 360 | #else |
| 357 | 361 | manager.kIM_Cer_BusiId = 12453; |
| 358 | 362 | #endif |
| 363 | + manager.kTIM_GetTokenUrl = @"https://api.cnlive.com/open/api2/im_chat/generateUserSign"; | |
| 359 | 364 | |
| 360 | 365 | manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02"; |
| 361 | 366 | manager.kTingYunAppKey = @"37c9ea3f439145269e5cffe095466b17"; | ... | ... |
CNLiveEnvironment/Classes/CNLiveInterface.h
| ... | ... | @@ -18,9 +18,16 @@ |
| 18 | 18 | #define cn_API_OpenApi2(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_OpenApi2,url] |
| 19 | 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 | 32 | #define iUploadContacts cn_API_Contact(@"/CnliveIM/notify/uploadContacts.action") |
| 26 | 33 | //其他投诉 | ... | ... |
Example/CNLiveEnvironment/XWAppDelegate.m
| ... | ... | @@ -22,8 +22,7 @@ |
| 22 | 22 | // NSLog(@"%@",APPKey); |
| 23 | 23 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 24 | 24 | // NSLog(@"%@",CNGetWitnessCancelCollection); |
| 25 | -// NSLog(@"%@",cn_API_Host(@"/我爱中国")); | |
| 26 | - NSLog(@"%@",WjjH5_VideoChina); | |
| 25 | + NSLog(@"%@",cn_API_Host(@"/我爱中国")); | |
| 27 | 26 | |
| 28 | 27 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; |
| 29 | 28 | // NSLog(@"%@",EnvironmentDesc); |
| ... | ... | @@ -34,9 +33,7 @@ |
| 34 | 33 | // NSLog(@"%@",APPKey); |
| 35 | 34 | // NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 36 | 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 | 22 | [CNLiveEnvironmentManager setEnvironment:CNLiveProductionAppStore]; |
| 23 | 23 | NSLog(@"%@",CNStockDarenVideoCallBackUrl); |
| 24 | 24 | NSLog(@"%@",CNGetWitnessCancelCollection); |
| 25 | - NSLog(@"%@",CNGetSpAddFollowsUrl); | |
| 25 | + NSLog(@"%@",NetAddShareImgUrl); | |
| 26 | + | |
| 27 | + | |
| 28 | + NSLog(@"%@",TIM_GetTokenUrl); | |
| 26 | 29 | |
| 27 | 30 | |
| 28 | 31 | } | ... | ... |