add clear

This commit is contained in:
2020-09-10 17:25:46 +08:00
parent 0d202fce14
commit c0ab8adfcb
9 changed files with 60 additions and 10 deletions
+4 -1
View File
@@ -18,7 +18,7 @@ class SmallProgram extends Miniprogarampage
* @return mixed
* @throws \Exception
*/
public function generateAccess_token()
public function generateAccess_token($get_token = false)
{
if (!empty($this->config->getToken())) {
return $this->config->getToken();
@@ -34,6 +34,9 @@ class SmallProgram extends Miniprogarampage
if (!$param->isResultsOK()) {
throw new \Exception($param->getMessage());
}
if ($get_token) {
return $param->getData('access_token');
}
return $param->getData();
}