clientFactory->create([ 'base_uri' => $this->BaseUri, 'timeout' => 5 ])->get($url); $contents = $tencentResponse->getBody()->getContents(); $this->log->info(__class__.':微信服务器返回token信息:', [$contents]); $res = json_decode($contents,true); if (empty($res['errcode']) || $res['errcode'] != 0) throw new ErrException($res['errmsg'] ?? '系统繁忙'); return $res; }catch (GuzzleException $e) { $this->log->debug(__CLASS__.':debug:'.$e->getMessage()); throw new ErrException($e->getMessage()); } } }