Browse Source

修改执行顺序

tgz 2 years ago
parent
commit
a05dd78bfe
1 changed files with 4 additions and 4 deletions
  1. 4 4
      app/services/TrackService.php

+ 4 - 4
app/services/TrackService.php

@@ -20,6 +20,10 @@ class TrackService
         if(empty($params['log_time'])){
             $params['log_time'] = date('Y-m-d H:i:s',time());
         }
+        // 修复数据不需要-记录 json 日志信息;
+        if (!$fix) {
+            Logger::track(json_encode($params));
+        }
         $track_data = json_encode($params);
         switch ($dycallback) {
             case 1:
@@ -34,10 +38,6 @@ class TrackService
                 // code...
                 break;
         }
-        // 修复数据不需要-记录 json 日志信息;
-        if (!$fix) {
-            Logger::track(json_encode($params));
-        }
     }
     
     /**