123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <?php
- namespace app\admin\controller\vbot;
- use think\Hook;
- class Example
- {
-
- public function example1()
- {
- $template_id = 1;
- Hook::listen('vbot_send_msg', $template_id);
-
-
- }
-
- public function example3()
- {
- $template_id = 'test_tpl';
- $vbot = new \addons\vbot\Vbot();
- $vbot->vbotSendMsg($template_id, [], [
- 'dynamic_variable' => '赋值成功~'
- ]);
- }
- public function run()
- {
- return 'run';
- }
-
- public function test($params)
- {
- return '我是 Example 下面的 test 方法 -> ' . $params;
- }
-
- public function example2()
- {
- $template_id = 1;
-
- Hook::listen('vbot_send_msg', $template_id, [
- 'robot_ids' => '发送机器人',
- 'content' => '自定义消息内容',
- 'picurl_image' => '',
- 'news' => [
- 'title' => '自定义链接标题',
- 'url' => '自定义链接URL',
- 'picurl' => '自定义链接图片URL'
- ],
- 'at_mobiles' => '1388888888',
- 'is_atall' => 1,
- ]);
- }
- }
|