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; }