Commit 0b223906 by feixiang

公众号发送消息扩展

parent cc967ca6
......@@ -16,7 +16,7 @@ class MpSender implements SenderInterface
private $data;
private $user;
private $unionId;
private $miniprogram;
......@@ -24,9 +24,9 @@ class MpSender implements SenderInterface
private $template;
public function __construct(array $user,array $miniprogram, array $sendData, string $template)
public function __construct(string $unionId,array $miniprogram, array $sendData, string $template)
{
$this->user = $user;
$this->unionId = $unionId;
$this->miniprogram = $miniprogram;
$this->sendData = $sendData;
$this->template = $template;
......@@ -35,8 +35,7 @@ class MpSender implements SenderInterface
public function format()
{
$this->data[$this->sendType] = [
'uid' => $this->user['id'],
'storeId' => $this->user['storeId'],
'unionId' => $this->unionId,
'template_id' => $this->template,
'miniprogram' => [
'appid' => $this->miniprogram['appId'], //小程序appid
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment