diff --git a/src/TTLock.php b/src/TTLock.php index bff3475..2359930 100644 --- a/src/TTLock.php +++ b/src/TTLock.php @@ -37,12 +37,12 @@ class TTLock private $client; - public function __construct( string $clientId, string $clientSecret ) + public function __construct( string $clientId, string $clientSecret, string $base_uri = 'https://api.ttlock.com.cn' ) { $this->clientId = $clientId; $this->clientSecret = $clientSecret; $this->client = new \GuzzleHttp\Client( [ - 'base_uri' => 'https://api.ttlock.com.cn', + 'base_uri' => $base_uri, ] ); } @@ -92,4 +92,4 @@ static function getDateTimeMillisecond( string $dateTime ) : int $return_data = str_pad( $date.$sec, 13, "0", STR_PAD_RIGHT ); //不足13位。右边补0 return (int)$return_data; } -} \ No newline at end of file +}