Files
huangjingfen/pro_v3.5.1/app/services/message/notice/EnterpriseWechatService.php

35 lines
871 B
PHP
Raw Permalink Normal View History

<?php
// +----------------------------------------------------------------------
// | Author: ScottPan Team
// +----------------------------------------------------------------------
namespace app\services\message\notice;
use app\jobs\notice\EnterpriseWechatJob;
/**
* 企业微信发送消息
* Created by PhpStorm.
* User: xurongyao <763569752@qq.com>
* Date: 2021/9/22 1:23 PM
*/
class EnterpriseWechatService extends BaseNoticeService
{
/**
* 发送消息
* @param array $data 模板内容
* @return bool
*/
public function sendMsg($data)
{
return $this->handle(function ($data) {
$url = $this->config['url'] ?? '';
$ent_wechat_text = $this->config['ent_wechat_text'] ?? '';
EnterpriseWechatJob::dispatchDo('doJob', [$data, $url, $ent_wechat_text]);
}, [$data]);
}
}