add clear
This commit is contained in:
@@ -97,7 +97,7 @@ class Subscribe extends AfficialAccount
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return array|mixed|\common\Result
|
* @return array|mixed|\wchat\common\Result
|
||||||
*/
|
*/
|
||||||
public function sendSubscribeMessage()
|
public function sendSubscribeMessage()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -109,17 +109,19 @@ class Subject 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,
|
||||||
"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');
|
||||||
|
|
||||||
|
|||||||
@@ -109,17 +109,19 @@ class Subject 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,
|
||||||
"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