Browse Source

引导的打点 跟 节点的打点分开

hexiaojie 1 năm trước cách đây
mục cha
commit
2098c4397d

+ 2 - 2
GameClient/Assets/Game/HotUpdate/Controller/GuideController.cs

@@ -160,7 +160,7 @@ namespace GFGGame
             {
                 return;
             }
-            LogServerHelper.SendNodeLog(GuideDataManager.currentGuideId * 100 + 1);
+            LogServerHelper.SendGuideFlowLog(GuideDataManager.currentGuideId * 100 + 1);
             ViewManager.Show<GuideView>(new List<object> { target, guideKey, guideStr, guideId, index, yTxt, justHint, noTips });
         }
         public static bool TryCompleteGuideIndex(string guideKey, int index)
@@ -204,7 +204,7 @@ namespace GFGGame
                 }
                 MainDataManager.Instance.CanSwipe = true;
                 
-                LogServerHelper.SendNodeLog(GuideDataManager.currentGuideId * 100 + 2);
+                LogServerHelper.SendGuideFlowLog(GuideDataManager.currentGuideId * 100 + 2);
                 GuideDataManager.currentGuideId = 0;
                 
                 HideGuide();

+ 24 - 4
GameClient/Assets/Game/HotUpdate/Controller/LogServerHelper.cs

@@ -21,14 +21,13 @@ namespace GFGGame
             logData.Account = DeviceUniqueIdHelper.GetDeviceUniqueId();
             logData.EventType = node;
             var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
-            //HttpTool.Instance.Post(GameConfig.logApiReportUrl, logStr);
             var body = $"?logStr={logStr}";
-            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null,false);
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
         }
+
         /// <summary>
         /// 发送玩法参与度
         /// </summary>
-        /// <param name="node"></param>
         public static void SendPlayParticipationLog(int eventType, int type)
         {
             var zoneScene = GameGlobal.zoneScene;
@@ -45,7 +44,28 @@ namespace GFGGame
             var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
             //HttpTool.Instance.Post(GameConfig.logApiReportUrl, logStr);
             var body = $"?logStr={logStr}";
-            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null,false);
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
+        }
+
+        /// <summary>
+        /// 发送引导日志
+        /// </summary>
+        /// <param name="node"></param>
+        public static void SendGuideFlowLog(int node)
+        {
+            var zoneScene = GameGlobal.zoneScene;
+            var logData = ET.GuideFlow.Instance;
+            logData.EventId = GenerateIDUtil.GenerateId();
+            logData.DtEventTime = DateTimeUtil.GetNowTime(DateTimeUtil.FormatE);
+            logData.PlatFormId = LauncherConfig.platformId;
+            logData.ChannelId = LauncherConfig.ChannelId;
+            logData.ServerId = zoneScene.GetComponent<ServerInfosComponent>().CurrentServerId;
+            logData.GuideId = node;
+            logData.PlayerId = zoneScene.GetComponent<RoleInfosComponent>().CurrentRoleId;
+            logData.PlayerName = zoneScene.GetComponent<RoleInfosComponent>().GetCurrentRoleName();
+            var logStr = zoneScene.GetComponent<LogSplicingComponent>().LogObjectToStr(logData);
+            var body = $"?logStr={logStr}";
+            HttpTool.Instance.Get(GameConfig.logApiReportUrl + body, null, false);
         }
     }
 }