From 90f00dd21521bf8b91c996780677ae6965b8d26f Mon Sep 17 00:00:00 2001 From: jianghanbo Date: Wed, 11 Sep 2024 17:25:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E6=8F=90=E9=86=92?= =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- service/app/server/Tongcheng.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/service/app/server/Tongcheng.php b/service/app/server/Tongcheng.php index 90aac7db..a6c4bb0f 100644 --- a/service/app/server/Tongcheng.php +++ b/service/app/server/Tongcheng.php @@ -18,6 +18,7 @@ class Tongcheng { protected $cookie; private $gate = 'https://ebk.17u.cn'; public $totalPage = 6; + private $tryTimes = 0; public function __construct($os = 6) { @@ -272,7 +273,10 @@ class Tongcheng { $res = json_decode($body); if (!isset($res->code) || $res->code != 1000) { Log::info( "同城 body:{$body} \n\n"); - (new ThirdApiService())->weComNotice($this->os); + if ($this->tryTimes > 3) { + (new ThirdApiService())->weComNotice($this->os); + } + $this->tryTimes++; } return $res; }