Explorar o código

调整obs链接

hexiaojie hai 1 ano
pai
achega
e9775bf0a8
Modificáronse 1 ficheiros con 34 adicións e 14 borrados
  1. 34 14
      GameClient/Assets/Game/Launcher/LauncherConfig.cs

+ 34 - 14
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -4,7 +4,15 @@ namespace GFGGame
 {
     public class LauncherConfig
     {
-        public enum EnumNetType { DEV, LOCAL, TEMP, TISHEN, PUBLIC }
+        public enum EnumNetType
+        {
+            DEV,
+            LOCAL,
+            TEMP,
+            TISHEN,
+            PUBLIC
+        }
+
         public static EnumNetType netType = EnumNetType.LOCAL;
         public static string cfgName;
 
@@ -16,49 +24,61 @@ namespace GFGGame
 
         public const string SQL_FILE_NAME = "excelConfig.sqlite.bytes";
 
-        public const string LAST_LOGIN_IS_AGREE_KEY = "LAST_LOGIN_IS_AGREE_KEY_6";//上次登录是否同意隐私政策
+        public const string LAST_LOGIN_IS_AGREE_KEY = "LAST_LOGIN_IS_AGREE_KEY_6"; //上次登录是否同意隐私政策
 
         public static string CDN_ROOT;
         public static string launcherRootUrl;
+
         public static string cfgUrl;
+
         //平台id
         public static int platformId = 1;
+
         //渠道id
         public static int ChannelId = 101;
-        public static string logApiRootUrl;//上报普通日志接口
-        public static string logApiReportLauncherUrl;//上报节点日志接口
+        public static string logApiRootUrl; //上报普通日志接口
+        public static string logApiReportLauncherUrl; //上报节点日志接口
+
         public static string apkVersion;
+
         //0 正常,1 维护中
         public static int serverStatus;
+
         public static string statusPrompt;
+
         //0 关闭所有log界面,1 开启后台log界面, 2 开启弹窗log界面
         public static int onDebug;
+
         //AB资源版本
         public static string manifest_v;
+
         //隐私政策文件地址模版
         public static string privacy_v;
         public static string updateAppPrompt;
         public static string updateResPrompt;
         public static int promptSizeMB;
+
         public static string updateUrl;
+
         //新发行给的adId
         public static string douYouAdId;
 
         public static void InitScriptCompilation()
         {
-            launcherRootUrl = "http://gfgclient.obs.cn-north-4.myhuaweicloud.com/";
+            launcherRootUrl = "http://gfg-client.obs.cn-north-4.myhuaweicloud.com/";
 #if PT_DEV
             //外网dev版本
             netType = EnumNetType.LOCAL;
             cfgName = "cfg_dev";
+            ChannelId = (int)ChannelID.Test;
 #elif PT_TAPTAP
             netType = EnumNetType.PUBLIC;
             cfgName = "cfg_taptap";
             ChannelId = (int)ChannelID.TapTap;
 #elif PT_DOUYOU
-            netType = EnumNetType.LOCAL;
-            cfgName = "cfg_sdkTest";
-            ChannelId = 22;
+            netType = EnumNetType.PUBLIC;
+            cfgName = "cfg_douyou";
+            ChannelId = (int)ChannelID.DouYou;
 #elif PT_IOS
             netType = EnumNetType.PUBLIC;
             cfgName = "cfg_ios";
@@ -70,7 +90,7 @@ namespace GFGGame
 #else
             netType = EnumNetType.LOCAL;
             cfgName = "cfg_local";
-            //launcherRootUrl = "http://10.108.64.189:81/";
+            ChannelId = (int)ChannelID.Test;
 #endif
 
             cfgUrl = launcherRootUrl + "platform/{cfgName}.json";
@@ -80,16 +100,15 @@ namespace GFGGame
         {
             var result = JsonMapper.ToObject<Result>(json);
             LauncherConfig.CDN_ROOT = result.cdnRoot;
-            // CDN_ROOT = "http://10.108.64.143/";
             LauncherConfig.logApiRootUrl = result.logApiUrl;
-            //LauncherConfig.logApiRootUrl = "http://10.108.64.106:8080/api/Log/";
             LauncherConfig.logApiReportLauncherUrl = LauncherConfig.logApiRootUrl + "ReportNode";
             LauncherConfig.apkVersion = result.apkVersion;
-            if(!string.IsNullOrEmpty(result.serverStatus))
+            if (!string.IsNullOrEmpty(result.serverStatus))
             {
                 LauncherConfig.serverStatus = int.Parse(result.serverStatus);
             }
-            if(!string.IsNullOrEmpty(result.onDebug))
+
+            if (!string.IsNullOrEmpty(result.onDebug))
             {
                 LauncherConfig.onDebug = int.Parse(result.onDebug);
             }
@@ -98,13 +117,14 @@ namespace GFGGame
             {
                 LauncherConfig.douYouAdId = result.douYouAdId;
             }
+
             LauncherConfig.manifest_v = result.manifest_v;
             LauncherConfig.privacy_v = result.privacy_v;
             LauncherConfig.statusPrompt = result.statusPrompt;
             LauncherConfig.updateAppPrompt = result.updateAppPrompt;
             LauncherConfig.updateResPrompt = result.updateResPrompt;
             LauncherConfig.updateUrl = result.updateUrl;
-            if(!string.IsNullOrEmpty(result.promptSizeMB))
+            if (!string.IsNullOrEmpty(result.promptSizeMB))
             {
                 LauncherConfig.promptSizeMB = int.Parse(result.promptSizeMB);
             }