企業微信
企業微信的使用與公眾號以及其它幾個應用的使用方式都是一致的,使用 \EasySwoole\WeChat\Factory::work($config)
來初始化:
<?php
$config = [
// 企業微信后臺的 企業 ID
'corpId' => 'xxxxxxxxxxxxxxxxx',
// 企業微信后臺的 secret
'corpSecret' => 'xxxxxxxxxxxxxxxxx',
// 企業微信后臺的 agentid
'agentId' => 100020, // 如果有 agentid 則填寫
];
// 企業微信
$work = \EasySwoole\WeChat\Factory::work($config);
然后你就可以用 $work
來調用企業微信的服務了。