瀏覽代碼

no message

kuaifan 5 年之前
父節點
當前提交
f5017d93d6
共有 1 個文件被更改,包括 7 次插入0 次删除
  1. 7 0
      app/Module/Umeng.php

+ 7 - 0
app/Module/Umeng.php

@@ -98,6 +98,13 @@ class Umeng
         if ($array['ret'] == 'SUCCESS') {
             return Base::retSuccess('success', $array['data']);
         } else {
+            $logFile = storage_path('logs/umeng-push-' . date('Y-m') . '.log');
+            file_put_contents($logFile, "[" . date("Y-m-d H:i:s") . "]\n" . Base::array2string_discard([
+                    'platform' => $platform,
+                    'url' => $url,
+                    'method' => $method,
+                    'body' => $body,
+                ]) . "\n");
             return Base::retError('error', $array['data']);
         }
     }