add clear

This commit is contained in:
2020-04-30 22:09:08 +08:00
parent 7bda1dbcce
commit 44146ad916
6 changed files with 236 additions and 257 deletions
+20 -64
View File
@@ -5,73 +5,29 @@
* Date: 2018/7/19 0019
* Time: 18:38
*/
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';
use officialaccount\AccessToken;
use wchat\Recharge;
use wchat\common\HttpClient;
$config = new \common\Config();
$config->setAppid('');
$config->setAppsecret('');
$config->setMchId('');
$config->setKey('');
$config->setRemoteAddr('');
$config->setDeviceInfo('');
$config->setAccessToken('');
\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}';
$config = new \wchat\common\Config();
$config->setUsrSwoole(true);
/** @var AccessToken $container */
$container = Container::newInstance(AccessToken::class, $config);
try {
$params = $container->generateAccess_token();
} catch (Exception $e) {
}
/** @var \wchat\qq\Template $model */
$model = \wchat\qq\Template::getInstance($config);
var_dump($model->sendTemplate());
// $json = json_decode($data, true);
//
// var_dump($json);
/** @var Recharge $container */
$container = Container::newInstance(\wchat\Recharge::class, $config);
$container->cashWithdrawal(1, 'xxx', 'xxx');
$container->recharge(1, 'xxx', 'xxx');
/** @var \wchat\Account $account */
$account = Container::newInstance(\wchat\Account::class, $config);
$account->login('');
$account->setSavePath('');
$account->login('');
try {
$account->createwxaqrcode('pages/index/index', 200);
$account->getwxacode('pages/index/index', 150, true);
$account->getwxacodeunlimit('pages/index/index', 150, true);
} catch (Exception $exception) {
}
/** @var \wchat\Message $message */
$message = Container::newInstance(\wchat\Message::class, $config);
$message->setOpenid('');
try {
$message->sendCardNews('');
$message->sendTextNews('');
$message->sendImageNews('');
$message->sendVoiceNews('');
$message->sendMpNewsNews('');
$message->sendNewsNews('', '', '', '');
$message->sendMusicNews('', '', '', '', '');
$message->sendMenuNews('', '');
$message->sendMiniprogrampageNews('', '', '', '');
$message->sendVideoNews('', '', '', '');
} catch (Exception $exception) {
}
try {
/** @var \wchat\Template $template */
$template = Container::newInstance(\wchat\Template::class, $config);
$template->setOpenid('');
$template->setOpenId('');
$template->setFormId('');
$template->setTemplateId('');
$template->setPage('');
$template->sendTemplate();
} catch (Exception $exception) {
}
});