作者 王智

baoxiu22

... ... @@ -207,39 +207,14 @@ class Common extends Api
{
//公众号所有粉丝openid
$LikeOpenid = $this->ListOpenid();
foreach ($LikeOpenid as $k => $v) {
$list[$k]['openid'] = $v;
$list[$k]['lang'] = 'zh_CN';
}
$token = $this->AccessToken();
$data['user_list'] = $list;
$res = $this->curlPost1('https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=' . $token, $data);
$arr = json_decode($res);
dump($arr);
// $options = [
// 'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
// 'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
// ];
// $app = new Application($options);
// $userService = $app->user;
// $users = $userService->batchGet($LikeOpenid);
// dump($users);
// die;
// $notice = $app->notice;
// $messageId = $notice->send([
// 'touser' => 'obtaR4jKqAts5e4Rp6ofEw7ftaes',
// 'template_id' => '3KUsUjjFnf3sf3meWIkAiVFhMM5U7Jgn3kyJFMFNPVc',
//// 'url' => 'xxxxx',
// 'data' => [
// 'first' => 1,
// 'keyword1' => 2,
// 'keyword2' => 2,
// 'keyword3' => 2,
// 'keyword4' => 2,
// 'keyword5' => 2,
// 'remark' => 1
// ],
// ]);
// return $messageId;
$options = [
'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
];
$app = new Application($options);
$userService = $app->user;
$users = $userService->batchGet($LikeOpenid);
dump($users);
die;
}
}
... ...