add clear

This commit is contained in:
as2252258@163.com
2019-11-11 18:14:47 +08:00
parent 62a2326e23
commit 7f138ef255
47 changed files with 2440 additions and 1100 deletions
+1 -20
View File
@@ -4,28 +4,9 @@
namespace wchat;
class Token extends Miniprogarampage
class Token extends SmallProgram
{
private $url = 'https://api.weixin.qq.com/cgi-bin/token';
/**
* @return mixed|null
*/
public function generateAccess_token()
{
$query = [
'grant_type' => 'client_credential',
'appid' => $this->config->getAppid(),
'secret' => $this->config->getAppsecret()
];
$param = $this->request->get($this->url, $query);
if (!$param->isResultsOK()) {
return null;
}
return $param->getData('access_token');
}
}