2018-07-19 19:43:07 +08:00
|
|
|
<?php
|
|
|
|
|
/**
|
|
|
|
|
* Created by PhpStorm.
|
|
|
|
|
* User: qv
|
|
|
|
|
* Date: 2018/7/19 0019
|
|
|
|
|
* Time: 18:38
|
|
|
|
|
*/
|
2020-04-30 22:09:08 +08:00
|
|
|
include_once __DIR__ . '/wchat/common/Progaram.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/common/Miniprogarampage.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/common/Help.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/common/Config.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/common/Result.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/common/HttpClient.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/qq/SmallProgram.php';
|
|
|
|
|
include_once __DIR__ . '/wchat/qq/Template.php';
|
2018-07-19 19:43:07 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
use wchat\common\HttpClient;
|
2019-11-11 18:14:47 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
\Swoole\Coroutine::create(function () {
|
|
|
|
|
$data = '{"id":"681133","username":"","nickname":"???? 闫 ????","openId":"ovnGZ5cj4GtvTeaRZqxYtTwp4lCc","gzhOpenId":"null","phone":"","email":"","password":"","server":0,"xcx_server":0,"unionID":"","avatar":"https:\/\/wx.qlogo.cn\/mmopen\/vi_32\/mGkblm7Ffz4o0prJKnqysoicFWYmwk2YzDqGecsAA10a1QSsRDEH70IserwXKBVMSjBHCaq7Z8YIeccXEHJt9lw\/132","sex":2,"city":"Shijiazhuang","province":"Hebei","country":"China","createTime":1530404031,"modifyTime":1530404048,"lastSeetime":0,"status":1,"groupId":0}';
|
2019-07-17 17:17:37 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
$config = new \wchat\common\Config();
|
|
|
|
|
$config->setUsrSwoole(true);
|
2019-07-17 17:17:37 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
/** @var \wchat\qq\Template $model */
|
|
|
|
|
$model = \wchat\qq\Template::getInstance($config);
|
|
|
|
|
var_dump($model->sendTemplate());
|
2019-11-11 18:14:47 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
// $json = json_decode($data, true);
|
|
|
|
|
//
|
|
|
|
|
// var_dump($json);
|
2019-07-17 17:17:37 +08:00
|
|
|
|
2020-04-30 22:09:08 +08:00
|
|
|
});
|