add clear

This commit is contained in:
as2252258@163.com
2019-07-17 17:27:31 +08:00
parent 9c6b01fc94
commit 2c711e5480
6 changed files with 57 additions and 35 deletions
+4 -5
View File
@@ -111,23 +111,22 @@ class Template extends Miniprogarampage
}
/**
* @param string $access
* @return Result
* @throws \Exception
*
* 奴隶交易通知
*/
public function sendTemplate(string $access)
public function sendTemplate()
{
$url = $this->sendUrl . '?access_token=' . $access;
$url = $this->sendUrl . '?access_token=' . $this->getAccessToken();
$params = [
$params = json_encode([
"touser" => $this->openId,
"template_id" => $this->templateId,
"page" => $this->page,
"form_id" => $this->formId,
"data" => $this->keywords,
];
], JSON_UNESCAPED_UNICODE);
if (!empty($this->emphasis_keyword)) {
$params['emphasis_keyword'] = $this->emphasis_keyword;