修改监管平台token过期问题
This commit is contained in:
parent
488cac531b
commit
aaf854e046
@ -80,7 +80,14 @@ class regulatoryPlatform
|
|||||||
throw new BusinessException(HttpEnumCode::getMessage(HttpEnumCode::SERVER_ERROR));
|
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'];
|
return $data['accessToken'];
|
||||||
} catch (GuzzleException $e) {
|
} catch (GuzzleException $e) {
|
||||||
@ -215,7 +222,7 @@ class regulatoryPlatform
|
|||||||
/**
|
/**
|
||||||
* 请求封装
|
* 请求封装
|
||||||
* @param string $path
|
* @param string $path
|
||||||
* @param array $option
|
* @param array $arg
|
||||||
* @return array
|
* @return array
|
||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
*/
|
*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user