Commit efa1edd3d86e640e8c5d7b34e43f6391e412c498

Authored by “张旭”
1 parent 697df95a

0.5.3 增加元码正式环境

CNLiveEnvironment.podspec
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 8
9 Pod::Spec.new do |s| 9 Pod::Spec.new do |s|
10 s.name = 'CNLiveEnvironment' 10 s.name = 'CNLiveEnvironment'
11 - s.version = '0.5.2' 11 + s.version = '0.5.3'
12 s.summary = 'CNLiveEnvironment' 12 s.summary = 'CNLiveEnvironment'
13 13
14 # This description is used to generate tags and improve search results. 14 # This description is used to generate tags and improve search results.
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.h
@@ -15,13 +15,14 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) { @@ -15,13 +15,14 @@ typedef NS_ENUM(NSInteger, CNLiveEnvironmentType) {
15 CNLiveProductionInHouse = 1, //正式企业环境 15 CNLiveProductionInHouse = 1, //正式企业环境
16 CNLiveDebugAppStore = 2, //测试商店环境 16 CNLiveDebugAppStore = 2, //测试商店环境
17 CNLiveProductionAppStore = 3, //正式商店环境 17 CNLiveProductionAppStore = 3, //正式商店环境
18 - CNLiveTestFlight = 4 //TestFlight环境 18 + CNLiveTestFlight = 4 //TestFlight环境
19 }; 19 };
20 20
21 typedef NS_ENUM(NSInteger, CNLiveAppType) { 21 typedef NS_ENUM(NSInteger, CNLiveAppType) {
22 CNLiveAppTypeUser = 0, //用户端 22 CNLiveAppTypeUser = 0, //用户端
23 CNLiveAppTypeBLive = 1, //企业端直播 23 CNLiveAppTypeBLive = 1, //企业端直播
24 CNLiveAppTypeBusiness = 2, //商家版 24 CNLiveAppTypeBusiness = 2, //商家版
  25 + CNLiveAppTypeMetaCode = 3 //元码
25 }; 26 };
26 27
27 @interface CNLiveEnvironmentManager : NSObject 28 @interface CNLiveEnvironmentManager : NSObject
CNLiveEnvironment/Classes/CNLiveEnvironmentManager.m
@@ -165,6 +165,10 @@ static CNLiveEnvironmentManager *_instance = nil; @@ -165,6 +165,10 @@ static CNLiveEnvironmentManager *_instance = nil;
165 } 165 }
166 break; 166 break;
167 167
  168 + case CNLiveAppTypeMetaCode: {
  169 + <#code#>
  170 + break;
  171 + }
168 } 172 }
169 } 173 }
170 174
@@ -629,6 +633,145 @@ static CNLiveEnvironmentManager *_instance = nil; @@ -629,6 +633,145 @@ static CNLiveEnvironmentManager *_instance = nil;
629 633
630 } 634 }
631 635
  636 +
  637 +#pragma mark - ******** 元码 ********
  638 +/**
  639 + * @abstract 初始化配置
  640 + * @param environmentType 环境
  641 + * @warning 必传参数
  642 + * 此方法环境默认为测试商店版,建议使用如下方法初始化.
  643 + * 在 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions; 方法中调用
  644 + */
  645 ++ (void)setMetaCodeEnvironment:(CNLiveEnvironmentType)environmentType{
  646 + [self setMetaCodeEnvironment:environmentType isNewHomePage:NO];
  647 +}
  648 ++ (void)setMetaCodeEnvironment:(CNLiveEnvironmentType)environmentType isNewHomePage:(BOOL)isNewHomePage;
  649 +{
  650 +
  651 + CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];
  652 + manager.environmentType = environmentType;
  653 + manager.isNewHomePage = isNewHomePage;
  654 +
  655 + switch (environmentType) {
  656 +#pragma mark - 测试企业环境
  657 + case CNLiveDebugInHouse://测试企业环境
  658 + {
  659 + }
  660 + break;
  661 +
  662 +#pragma mark - 正式企业环境
  663 + case CNLiveProductionInHouse://正式企业环境
  664 + {
  665 + }
  666 + break;
  667 +
  668 +#pragma mark - 测试商店环境
  669 + case CNLiveDebugAppStore://测试商店环境
  670 + {
  671 + }
  672 + break;
  673 +
  674 +#pragma mark - 正式商店环境
  675 + case CNLiveProductionAppStore://正式商店环境
  676 + {
  677 + manager.isTestEnvironment = NO;
  678 +
  679 + manager.kAppDownloadUrl = @"https://apiwjj.cnlive.com/download/index.html";
  680 + manager.kWjjH5_Host = @"http://wjjh5.cnlive.com";
  681 + manager.kWjjH5 = @"wjjh5.cnlive.com";
  682 +
  683 + manager.kAPI_Host = @"https://apiwjj.cnlive.com";
  684 + manager.kAPI_Contact = @"https://wjjim.cnlive.com";
  685 + manager.kAPI_Refund = @"https://wjj.ys1.cnliveimg.com";
  686 + manager.kAPI_Report = @"https://mobile.cnlive.com";
  687 + manager.kAPI_OpenApi2 = @"https://api.cnlive.com/open/api2";
  688 + manager.kAPI_Classify = @"https://cms.cnlive.com/api";//@"http://cms.cnlive.com:8768";
  689 + manager.kAPI_Managemall = @"https://managemall.cnlive.com";
  690 + manager.kAPI_Manageshop = @"https://manageshop.cnlive.com";
  691 + manager.kAPI_LtyAdmin = @"https://ltyadmin.cnlive.com";
  692 + manager.kAPI_Pay = @"https://apiumspay.cnlive.com";
  693 + manager.kAPI_Community = @"https://apicommunity.cnlive.com";//@"http://api.community.cnlive.com";
  694 +
  695 + manager.environmentDesc = @"正式商店版";
  696 + manager.bundleId = @"com.cnlive.CNLiveNetAdd";
  697 +
  698 + manager.appId = @"769_jetj7bq525";
  699 + manager.appDESKey = @"IuSstKh2";
  700 + manager.appKey = @"0d57b045ec0c3988a682d94c644e66b9b8e0d2b8ef937d";
  701 + manager.appSecret = @"275e8dc29274a1186d82f65bc607c231d02bcb3bfd8976";
  702 +
  703 + manager.displayName = @"网家家";
  704 +#if DEBUG
  705 + manager.kIM_Cer_BusiId = 24274;
  706 +#else
  707 + manager.kIM_Cer_BusiId = 24273;
  708 +#endif
  709 + manager.kTIM_GetTokenUrl = @"https://wjjim.cnlive.com/CnliveIM/notify/generateUserSign.action";
  710 +
  711 + manager.kGDApiKey = @"5a0e2a559b987e67d5b0c13490adde02";
  712 + manager.kTingYunAppKey = @"aa8fbd3c3bb14baa83e771b60e55f710";
  713 +
  714 + manager.kBucketName = @"mam-wjj-769";
  715 + manager.kPhotoUrl = @"http://wjj.ys2.cnliveimg.com/";
  716 + manager.kMultipleCategory = 366;
  717 + manager.kWitnessMultipleCategory = 370;
  718 +
  719 + manager.kBDAppId = @"14380860";
  720 + manager.kBDAppKey = @"4bX1eK7SiCL461QBnRKilowc";
  721 + manager.kBDSecret = @"BTzXLoPbUjlLeOM1nHnfOuTB9q18YZVq";
  722 +
  723 + manager.kBDMapAK = @"KbQoyL7KebOF1CvHWHqKa61pf8nMhUL4";
  724 + manager.kBDMapMCODE = @"com.cnlive.CNLiveNetAdd";
  725 + manager.kBDMapServiceID = 214690;
  726 +
  727 + manager.kWeiChatAppId_Share = @"wxed528fc749b7ee88";
  728 + manager.kWeiChatAppSecret_Share = @"729c3d3055fe336bcdef7020c2548e89";
  729 +
  730 + manager.kQQShareAppId_Share = @"1106691520";
  731 + manager.kQQShareAppSecret_Share = @"kLZ8CglGFjzrJFan";
  732 +
  733 + manager.kWeiBoShareAppId_Share = @"1337575478";
  734 + manager.kWeiBoShareAppSecret_Share = @"1bff97cec7f760e64a37b2c6d6d7db86";
  735 + manager.kWeiBoShareAppKey_Share = @"3884700821";
  736 +
  737 + manager.kShareSDKAppId_Share = @"24e4abeaa92d8";
  738 + manager.kShareSDKAppSecret_Share = @"da94a6f881d404092c9a7108e4470e8f";
  739 +
  740 + manager.kWjjShare_Iden = @"group.com.cnlive.CNLiveNetAdd";
  741 +
  742 + manager.kWXAccount = @"wjj_app";
  743 + manager.kSdkAppId = @"1400051680";
  744 + manager.kSdkAccountType = @"19645";
  745 +
  746 + manager.kUMengAppKey = @"5d7856830cafb270770000b2";
  747 +
  748 + manager.kNetAddUrlSchems = @"CNLiveNetAddUrlSchems";
  749 + manager.kNetAddUnionPaySchems = @"CNLiveNetAddUnionPaySchems";
  750 +
  751 + manager.kWjjApplePayAVProductIdBase = @"com.cnlive.metaCode.";
  752 +
  753 + manager.kScanGoodsAppId = @"MTAw";
  754 + manager.kScanGoodsAppSecret = @"66ac759fac6bb7bfe21a270cec12c8b8";
  755 + manager.kScanGoodsActivityId = @"83";
  756 + manager.kScanGoodsUrl = @"http://wmgj.cnlive.com";
  757 +
  758 + }
  759 + break;
  760 +
  761 +#pragma mark - TestFlight环境
  762 + case CNLiveTestFlight://TestFlight环境
  763 + {
  764 + }
  765 + break;
  766 +
  767 + default:
  768 + break;
  769 +
  770 + }
  771 +
  772 +}
  773 +
  774 +
632 #pragma mark - ******** 企业端直播 ******** 775 #pragma mark - ******** 企业端直播 ********
633 + (void)setBLiveEnvironment:(CNLiveEnvironmentType)environmentType{ 776 + (void)setBLiveEnvironment:(CNLiveEnvironmentType)environmentType{
634 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager]; 777 CNLiveEnvironmentManager *manager = [CNLiveEnvironmentManager manager];