update vendor/zoujingli/wechat-developer/WeChat/Contracts/BasicWeWork.php.

This commit is contained in:
Hanyi 2021-01-21 11:22:50 +08:00 committed by Gitee
parent 4b22944291
commit 5c9c9dce8b

View File

@ -30,7 +30,7 @@ class BasicWeWork extends BasicWeChat
public function getAccessToken()
{
if ($this->access_token) return $this->access_token;
$ckey = $this->config->get('appid') . '_access_token';
$ckey = $this->config->get('appid') . $this->config->get('appsecret') . '_access_token';
if ($this->access_token = Tools::getCache($ckey)) return $this->access_token;
list($appid, $secret) = [$this->config->get('appid'), $this->config->get('appsecret')];
$result = Tools::json2arr(Tools::get("https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid={$appid}&corpsecret={$secret}"));