guodong 2 anni fa
parent
commit
949a33a885

+ 2 - 0
GameClient/Assets/Game/HotUpdate/Controller/LogServerHelper.cs

@@ -17,6 +17,7 @@ namespace GFGGame
             logData.DtEventTime = DateTimeUtil.GetNowTime(DateTimeUtil.FormatE);
             logData.PlatFormId = LauncherConfig.platformId;
             logData.ServerId = zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId;
+            logData.ChannelId = GameConfig.ChannelId;
             logData.Account = SystemInfo.deviceUniqueIdentifier;
             logData.EventType = node;
             var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
@@ -33,6 +34,7 @@ namespace GFGGame
             logData.EventId = GenerateIDUtil.GenerateId();
             logData.DtEventTime = DateTimeUtil.GetNowTime(DateTimeUtil.FormatE);
             logData.PlatFormId = LauncherConfig.platformId;
+            logData.ChannelId = GameConfig.ChannelId;
             logData.ServerId = zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId;
             logData.PlayerId = zoneScene.GetComponent<RoleInfosComponent>().CurrentRoleId;
             logData.PlayerName = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRoleName();

+ 2 - 0
GameClient/Assets/Game/HotUpdate/GameConfig.cs

@@ -12,6 +12,8 @@ namespace GFGGame
         public static string PlatformName;
         public static string logApiReportUrl;
         public static int showGM;
+        //渠道id
+        public static int ChannelId = 1;
 
         public static void InitData(string json)
         {

+ 2 - 2
GameClient/Assets/Game/Launcher/LauncherConfig.cs

@@ -25,7 +25,7 @@ namespace GFGGame
         public static int platformId = 1;
         public static string logKey;
         public static string logApiRootUrl;
-        public static string logApiReportNodeUrl;
+        public static string logApiReportLauncherUrl;
         public static string apkVersion;
         public static int serverStatus;
         public static int onDebug;
@@ -69,7 +69,7 @@ namespace GFGGame
             LauncherConfig.CDN_ROOT = result.cdnRoot;
             //CDN_ROOT = "http://10.108.64.127/";
             LauncherConfig.logApiRootUrl = result.logApiUrl;
-            LauncherConfig.logApiReportNodeUrl = LauncherConfig.logApiRootUrl + "ReportNode";
+            LauncherConfig.logApiReportLauncherUrl = LauncherConfig.logApiRootUrl + "ReportNode";
             LauncherConfig.logKey = result.logKey;
             LauncherConfig.apkVersion = result.apkVersion;
             LauncherConfig.serverStatus = int.Parse(result.serverStatus);

+ 2 - 14
GameClient/Assets/Game/Launcher/Log/LogServerHelperHttp.cs

@@ -11,20 +11,8 @@ namespace GFGGame
         /// <param name="node"></param>
         public static void SendNodeLog(int node, int serverId = 1)
         {
-            //var zoneScene = GameGlobal.zoneScene;
-            //var logData = new EventTrackFlow2();
-            //logData.iEventId = GenerateIDUtil.GenerateId();
-            //logData.dtEventTime = DateTimeUtil.GetNowTime(DateTimeUtil.FormatE);
-            //logData.iOperatorId = LauncherConfig.platformId;
-            //logData.iServerId = zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId;
-            //logData.sAccount = SystemInfo.deviceUniqueIdentifier;
-            //logData.iEvent = (int)node;
-            //var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
-
-
-
-            //var body = $"{LauncherConfig.logKey}|{LauncherConfig.platformId}|{SystemInfo.deviceUniqueIdentifier}|{node}|{serverId}";
-            //HttpTool.Instance.Post(LauncherConfig.logApiUrl, body);
+            var body = $"{LauncherConfig.platformId}|{SystemInfo.deviceUniqueIdentifier}|{node}";
+            HttpTool.Instance.Post(LauncherConfig.logApiReportLauncherUrl, body);
         }
     }
 }