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