Commit 678b4531b1743c69863e6b106fed2ff525c6d794

Authored by iOS-Xiaowen
1 parent c10f8485

no message

CNLiveEnvironment/Classes/CNLiveEnvironment.h
... ... @@ -111,4 +111,10 @@
111 111  
112 112 #define CNLiveWjjApplePayAVProductIdBase [CNLiveEnvironmentManager manager].kWjjApplePayAVProductIdBase
113 113  
  114 +// 物媒识别
  115 +#define ScanGoodsAppId [CNLiveEnvironmentManager manager].kScanGoodsAppId
  116 +#define ScanGoodsAppSecret [CNLiveEnvironmentManager manager].kScanGoodsAppSecret
  117 +#define ScanGoodsActivityId [CNLiveEnvironmentManager manager].kScanGoodsActivityId
  118 +#define ScanGoodsUrl [CNLiveEnvironmentManager manager].kScanGoodsUrl
  119 +
114 120 #endif /* CNLiveEnvironment_h */
... ...
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
... ... @@ -105,6 +105,13 @@ typedef NS_ENUM(NSInteger, CNLiveAppType) {
105 105 @property (nonatomic, copy, readonly) NSString *kNetAddUnionPaySchems;
106 106  
107 107 @property (nonatomic, copy, readonly) NSString *kWjjApplePayAVProductIdBase;
  108 +
  109 +// 物媒识别
  110 +@property (nonatomic, copy, readonly) NSString *kScanGoodsAppId;
  111 +@property (nonatomic, copy, readonly) NSString *kScanGoodsAppSecret;
  112 +@property (nonatomic, copy, readonly) NSString *kScanGoodsActivityId;
  113 +@property (nonatomic, copy, readonly) NSString *kScanGoodsUrl;
  114 +
108 115 /**
109 116 * @abstract 单例初始化
110 117 */
... ...
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
... ... @@ -88,6 +88,12 @@
88 88  
89 89 @property (nonatomic, copy, readwrite) NSString *kWjjApplePayAVProductIdBase;
90 90  
  91 +// 物媒识别
  92 +@property (nonatomic, copy, readwrite) NSString *kScanGoodsAppId;
  93 +@property (nonatomic, copy, readwrite) NSString *kScanGoodsAppSecret;
  94 +@property (nonatomic, copy, readwrite) NSString *kScanGoodsActivityId;
  95 +@property (nonatomic, copy, readwrite) NSString *kScanGoodsUrl;
  96 +
91 97 @end
92 98  
93 99 @implementation CNLiveEnvironmentManager
... ... @@ -203,6 +209,11 @@ static CNLiveEnvironmentManager *_instance = nil;
203 209 manager.kNetAddUrlSchems = @"CNLiveNetAddTestUrlSchems";
204 210 manager.kNetAddUnionPaySchems = @"CNLiveNetAddTestUnionPaySchems";
205 211  
  212 + manager.kScanGoodsAppId = @"MTY=";
  213 + manager.kScanGoodsAppSecret = @"271c9c71d9c107997cf4074d652f4262";
  214 + manager.kScanGoodsActivityId = @"27";
  215 + manager.kScanGoodsUrl = @"http://wmgjmewtest.iseasoon.com";
  216 +
206 217 }
207 218 break;
208 219  
... ... @@ -276,6 +287,11 @@ static CNLiveEnvironmentManager *_instance = nil;
276 287  
277 288 manager.kNetAddUrlSchems = @"CNLiveNetAddUrlSchems";
278 289 manager.kNetAddUnionPaySchems = @"CNLiveNetAddUnionPaySchems";
  290 +
  291 + manager.kScanGoodsAppId = @"MTAw";
  292 + manager.kScanGoodsAppSecret = @"66ac759fac6bb7bfe21a270cec12c8b8";
  293 + manager.kScanGoodsActivityId = @"83";
  294 + manager.kScanGoodsUrl = @"http://wmgj.cnlive.com";
279 295  
280 296 }
281 297 break;
... ... @@ -353,6 +369,11 @@ static CNLiveEnvironmentManager *_instance = nil;
353 369  
354 370 manager.kWjjApplePayAVProductIdBase = @"com.cnlive.netAdd.";
355 371  
  372 + manager.kScanGoodsAppId = @"MTY=";
  373 + manager.kScanGoodsAppSecret = @"271c9c71d9c107997cf4074d652f4262";
  374 + manager.kScanGoodsActivityId = @"27";
  375 + manager.kScanGoodsUrl = @"http://wmgjmewtest.iseasoon.com";
  376 +
356 377 }
357 378 break;
358 379  
... ... @@ -428,6 +449,11 @@ static CNLiveEnvironmentManager *_instance = nil;
428 449  
429 450 manager.kWjjApplePayAVProductIdBase = @"com.cnlive.netPlusPlus.";
430 451  
  452 + manager.kScanGoodsAppId = @"MTAw";
  453 + manager.kScanGoodsAppSecret = @"66ac759fac6bb7bfe21a270cec12c8b8";
  454 + manager.kScanGoodsActivityId = @"83";
  455 + manager.kScanGoodsUrl = @"http://wmgj.cnlive.com";
  456 +
431 457 }
432 458 break;
433 459  
... ... @@ -503,6 +529,11 @@ static CNLiveEnvironmentManager *_instance = nil;
503 529 manager.kNetAddUnionPaySchems = @"CNLiveNetAddTestUnionPaySchems";
504 530  
505 531 manager.kWjjApplePayAVProductIdBase = @"com.cnlive.netPlusPlus.";
  532 +
  533 + manager.kScanGoodsAppId = @"MTY=";
  534 + manager.kScanGoodsAppSecret = @"271c9c71d9c107997cf4074d652f4262";
  535 + manager.kScanGoodsActivityId = @"27";
  536 + manager.kScanGoodsUrl = @"http://wmgjmewtest.iseasoon.com";
506 537  
507 538 }
508 539 break;
... ...
CNLiveEnvironment/Classes/CNLiveInterface.h
... ... @@ -17,6 +17,7 @@
17 17 #define cn_API_Report(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kAPI_Report,url]
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 +#define cn_API_ScanGoods(url) [NSString stringWithFormat:@"%@%@",[CNLiveEnvironmentManager manager].kScanGoodsUrl,url]
20 21  
21 22 // 分享使用到的logo图片
22 23 #define NetAddShareImgUrl cn_WjjH5_Host(@"/static/logo.png")
... ... @@ -767,5 +768,7 @@
767 768  
768 769 #define CNLoadNotifyCommentsUrl cn_API_OpenApi2(@"/commentServices/commentForTopic/loadNotifyComments")
769 770  
  771 +//物媒识别
  772 +#define CNScanGoodsUrl cn_API_ScanGoods(@"/mobile-web-user/ws/mobile/v1/active/scan")
770 773  
771 774 #endif /* CNLiveInterface_h */
... ...
Example/CNLiveEnvironment/XWAppDelegate.m
... ... @@ -14,16 +14,19 @@
14 14 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
15 15 {
16 16  
17   - NSLog(@"%@",DisplayName);
18   - NSLog(@"%d",TestEnvironment);
19   - NSLog(@"%@",AppId);
20   -
21   - [CNLiveEnvironmentManager setAppType:CNLiveAppTypeBLive environmentType:CNLiveDebugAppStore];//CNLiveDebugAppStore//CNLiveProductionAppStore//CNLiveTestFlight
22   -
23   - NSLog(@"%@",DisplayName);
24   - NSLog(@"%d",TestEnvironment);
25   - NSLog(@"%@",AppId);
26   -
  17 +// NSLog(@"%@",DisplayName);
  18 +// NSLog(@"%d",TestEnvironment);
  19 +// NSLog(@"%@",AppId);
  20 +
  21 + [CNLiveEnvironmentManager setAppType:CNLiveAppTypeUser environmentType:CNLiveProductionAppStore];//CNLiveDebugAppStore//CNLiveProductionAppStore//CNLiveTestFlight
  22 +
  23 +// NSLog(@"%@",DisplayName);
  24 +// NSLog(@"%d",TestEnvironment);
  25 +// NSLog(@"%@",AppId);
  26 + NSLog(@"%@",CNScanGoodsUrl);
  27 + NSLog(@"%@",ScanGoodsAppId);
  28 + NSLog(@"%@",ScanGoodsAppSecret);
  29 + NSLog(@"%@",ScanGoodsActivityId);
27 30  
28 31 return YES;
29 32 }
... ...
Example/CNLiveEnvironment/XWViewController.m
... ... @@ -33,7 +33,7 @@
33 33 // NSLog(@"测试");
34 34 // NSLog(@"id%@",WeiBoShareAppId_Share);
35 35 // NSLog(@"key%@",WeiBoShareAppKey_Share);
36   - NSLog(@"kTIM_GetTokenUrl %@",TIM_GetTokenUrl);
  36 +// NSLog(@"kTIM_GetTokenUrl %@",TIM_GetTokenUrl);
37 37 }
38 38  
39 39 - (void)didReceiveMemoryWarning
... ...