Wang Chen 4 years ago
parent
commit
b5a86b95ac
1 changed files with 3 additions and 2 deletions
  1. 3 2
      app/Modules/Report/Services/ReportService.php

+ 3 - 2
app/Modules/Report/Services/ReportService.php

@@ -118,16 +118,17 @@ class ReportService
         $client = new Client(['timeout' => 3, 'verify' => false]);
 
         // 执行上报
-        $url = env('REPORT_URI') . $uri;
+        $url         = env('REPORT_URI') . $uri;
         $result      = $client->post($url, [
             'headers' => [
                 'x-code' => 'Mvnx1Yr3O8i!TS5u'
             ],
             'json'    => $data
         ]);
+        $status      = $result->getStatusCode();
         $contentJson = $result->getBody()->getContents();
         $contentArr  = json_decode($contentJson, true);
-        myLog('report')->info($uri, compact('url', 'data', 'contentArr'));
+        myLog('report')->info($uri, compact('url', 'data', 'status', 'contentJson', 'contentArr'));
 
         return $contentArr;
     }