作者 竞泽

alter:优化配置opt

1 <?php 1 <?php
2 2
3 return [ 3 return [
4 - 'host' => '',  
5 'cert_no' => '', 4 'cert_no' => '',
6 'client' => [ 5 'client' => [
7 - 'timeout' => 60 6 + 'base_uri' => '',
  7 + 'timeout' => 60,
8 ] 8 ]
9 ]; 9 ];
@@ -27,13 +27,8 @@ class Client @@ -27,13 +27,8 @@ class Client
27 */ 27 */
28 protected function __construct(RequestInterface $request) 28 protected function __construct(RequestInterface $request)
29 { 29 {
30 - $clientConfig = (array)config('customs.client', [  
31 - 'timeout' => 30  
32 - ]);  
33 - $config = $clientConfig + [  
34 - 'base_uri' => config('customs.host')  
35 - ];  
36 - $this->guzzleHttp = new GuzzleHttp($config); 30 + $clientConfig = (array)config('customs.client');
  31 + $this->guzzleHttp = new GuzzleHttp($clientConfig);
37 $this->request = $request; 32 $this->request = $request;
38 } 33 }
39 34