1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-07-14 20:31:22 +08:00
2020-12-23 11:45:42 +08:00

36 lines
878 B
PHP

<?php
namespace App\Services\Wechat\Notice;
use App\Models\WechatSubscribe as WechatSubscribeModel;
use App\Services\WechatNotice;
class ConsultReply extends WechatNotice
{
protected $templateCode = 'consult_reply';
/**
* @param WechatSubscribeModel $subscribe
* @param array $params
* @return bool
*/
public function handle(WechatSubscribeModel $subscribe, array $params)
{
$first = sprintf('%s 回复了你的咨询!', $params['replier']['name']);
$remark = '如果还有其它疑问,请和我们保持联系哦!';
$params = [
'first' => $first,
'remark' => $remark,
'keyword1' => $params['course']['title'],
];
$templateId = $this->getTemplateId($this->templateCode);
return $this->send($subscribe->open_id, $templateId, $params);
}
}