add clear
This commit is contained in:
+7
-7
@@ -123,18 +123,18 @@ class Template extends SmallProgram
|
||||
{
|
||||
$url = $this->sendUrl . '?access_token=' . $this->config->getAccessToken();
|
||||
|
||||
$params = json_encode([
|
||||
"touser" => $this->openId,
|
||||
$params = [
|
||||
"touser" => $this->openId,
|
||||
"template_id" => $this->templateId,
|
||||
"page" => $this->page,
|
||||
"form_id" => $this->formId,
|
||||
"data" => $this->keywords,
|
||||
], JSON_UNESCAPED_UNICODE);
|
||||
"page" => $this->page,
|
||||
"form_id" => $this->formId,
|
||||
"data" => $this->keywords,
|
||||
];
|
||||
|
||||
if (!empty($this->emphasis_keyword)) {
|
||||
$params['emphasis_keyword'] = $this->emphasis_keyword;
|
||||
}
|
||||
|
||||
$params = json_encode($params, JSON_UNESCAPED_UNICODE);
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->addHeader('content-type', 'application/json');
|
||||
|
||||
|
||||
+3
-2
@@ -121,17 +121,18 @@ class Template extends SmallProgram
|
||||
public function sendTemplate()
|
||||
{
|
||||
$url = $this->sendUrl . '?access_token=' . $this->config->getAccessToken();
|
||||
$params = json_encode([
|
||||
$params = [
|
||||
"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;
|
||||
}
|
||||
$params = json_encode($params, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
$this->request->setIsSSL(true);
|
||||
$this->request->addHeader('content-type', 'application/json');
|
||||
|
||||
Reference in New Issue
Block a user