diff --git a/extend/RegulatoryPlatform/regulatoryPlatform.php b/extend/RegulatoryPlatform/regulatoryPlatform.php index 14ca004..e442155 100644 --- a/extend/RegulatoryPlatform/regulatoryPlatform.php +++ b/extend/RegulatoryPlatform/regulatoryPlatform.php @@ -80,7 +80,14 @@ class regulatoryPlatform throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR)); } - $this->redis->set("regulatory_platform_access_token", $data['accessToken'], 60 * 60 * 24 * 6); + $expires_in = 60 * 60 * 24 * 6; + if (!empty($data['expiresIn'])) { + if ($data['expiresIn'] > 100){ + $expires_in = $data['expiresIn']; + } + } + + $this->redis->set("regulatory_platform_access_token", $data['accessToken'],$expires_in); return $data['accessToken']; } catch (GuzzleException $e) { @@ -215,7 +222,7 @@ class regulatoryPlatform /** * 请求封装 * @param string $path - * @param array $option + * @param array $arg * @return array * @throws GuzzleException */