正在显示
1 个修改的文件
包含
7 行增加
和
4 行删除
@@ -339,7 +339,7 @@ public function deleteDirectory($path) | @@ -339,7 +339,7 @@ public function deleteDirectory($path) | ||
339 | * @param array $files | 339 | * @param array $files |
340 | * @return string | 340 | * @return string |
341 | */ | 341 | */ |
342 | - public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRAFFICZERO,$files = []){ | 342 | + public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRAFFICZERO){ |
343 | if($request->getClientIp() == "127.0.0.1"){ | 343 | if($request->getClientIp() == "127.0.0.1"){ |
344 | return $this->success(); | 344 | return $this->success(); |
345 | } | 345 | } |
@@ -359,13 +359,16 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA | @@ -359,13 +359,16 @@ public function transmit($request, $type = self::TYPEVISIT, $traffic = self::TRA | ||
359 | $req["domain"] = $request->getHost(); | 359 | $req["domain"] = $request->getHost(); |
360 | $req["ip"] = $request->getClientIp(); | 360 | $req["ip"] = $request->getClientIp(); |
361 | $req["user_agent"] = $request->userAgent(); | 361 | $req["user_agent"] = $request->userAgent(); |
362 | - $req["files"] = $files; | 362 | + $req["files"] = isset($data["files"]) ? $data["files"] : null; |
363 | $req["type"] = $type; | 363 | $req["type"] = $type; |
364 | $req["traffic"] = $traffic; | 364 | $req["traffic"] = $traffic; |
365 | 365 | ||
366 | + @file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "请求:". $req . PHP_EOL, FILE_APPEND); | ||
366 | //转发接口 | 367 | //转发接口 |
367 | $transmitUrl = env("TRANSMIT_URL"); | 368 | $transmitUrl = env("TRANSMIT_URL"); |
368 | - return $this->httpPost($transmitUrl,json_encode($req)); | 369 | + $resp = $this->httpPost($transmitUrl,json_encode($req)); |
370 | + @file_put_contents(storage_path('logs/notify_send.log'), date('Y-m-d H:i:s') . "响应:". $resp . PHP_EOL, FILE_APPEND); | ||
371 | + return $resp; | ||
369 | } | 372 | } |
370 | 373 | ||
371 | /** | 374 | /** |
@@ -531,7 +534,7 @@ public function inquiry(Request $request) | @@ -531,7 +534,7 @@ public function inquiry(Request $request) | ||
531 | } | 534 | } |
532 | 535 | ||
533 | $data["files"] = $request->allFiles(); | 536 | $data["files"] = $request->allFiles(); |
534 | - return $this->transmit($request,self::TYPEINQUIRY,self::TRAFFICZERO,$data["files"]); | 537 | + return $this->transmit($request,self::TYPEINQUIRY,self::TRAFFICZERO); |
535 | } | 538 | } |
536 | 539 | ||
537 | /** | 540 | /** |
-
请 注册 或 登录 后发表评论