|
@@ -207,30 +207,37 @@ class Common extends Api |
|
@@ -207,30 +207,37 @@ class Common extends Api |
207
|
{
|
207
|
{
|
208
|
//公众号所有粉丝openid
|
208
|
//公众号所有粉丝openid
|
209
|
$LikeOpenid = $this->ListOpenid();
|
209
|
$LikeOpenid = $this->ListOpenid();
|
210
|
- $options = [
|
|
|
211
|
- 'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
|
|
|
212
|
- 'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
|
|
|
213
|
- ];
|
|
|
214
|
- $app = new Application($options);
|
|
|
215
|
- $userService = $app->user;
|
|
|
216
|
- $users = $userService->batchGet($LikeOpenid);
|
|
|
217
|
- dump($users);
|
|
|
218
|
- die;
|
|
|
219
|
- $notice = $app->notice;
|
|
|
220
|
- $messageId = $notice->send([
|
|
|
221
|
- 'touser' => 'obtaR4jKqAts5e4Rp6ofEw7ftaes',
|
|
|
222
|
- 'template_id' => '3KUsUjjFnf3sf3meWIkAiVFhMM5U7Jgn3kyJFMFNPVc',
|
|
|
223
|
-// 'url' => 'xxxxx',
|
|
|
224
|
- 'data' => [
|
|
|
225
|
- 'first' => 1,
|
|
|
226
|
- 'keyword1' => 2,
|
|
|
227
|
- 'keyword2' => 2,
|
|
|
228
|
- 'keyword3' => 2,
|
|
|
229
|
- 'keyword4' => 2,
|
|
|
230
|
- 'keyword5' => 2,
|
|
|
231
|
- 'remark' => 1
|
|
|
232
|
- ],
|
|
|
233
|
- ]);
|
|
|
234
|
- return $messageId;
|
210
|
+ foreach ($LikeOpenid as $k => $v) {
|
|
|
211
|
+ $LikeOpenid[$k]['lang'] = 'zh_CN';
|
|
|
212
|
+ }
|
|
|
213
|
+ $token = $this->AccessToken();
|
|
|
214
|
+ $data['user_list'] = $LikeOpenid;
|
|
|
215
|
+ $res = $this->curlPost1('https://api.weixin.qq.com/cgi-bin/user/info/batchget?access_token=' . $token, $data);
|
|
|
216
|
+ dump($res);
|
|
|
217
|
+// $options = [
|
|
|
218
|
+// 'app_id' => 'wx3b0bb7a5d1e0722d', // AppID
|
|
|
219
|
+// 'secret' => '104ac7dbcc57b778a7319d35d38ed9cd',
|
|
|
220
|
+// ];
|
|
|
221
|
+// $app = new Application($options);
|
|
|
222
|
+// $userService = $app->user;
|
|
|
223
|
+// $users = $userService->batchGet($LikeOpenid);
|
|
|
224
|
+// dump($users);
|
|
|
225
|
+// die;
|
|
|
226
|
+// $notice = $app->notice;
|
|
|
227
|
+// $messageId = $notice->send([
|
|
|
228
|
+// 'touser' => 'obtaR4jKqAts5e4Rp6ofEw7ftaes',
|
|
|
229
|
+// 'template_id' => '3KUsUjjFnf3sf3meWIkAiVFhMM5U7Jgn3kyJFMFNPVc',
|
|
|
230
|
+//// 'url' => 'xxxxx',
|
|
|
231
|
+// 'data' => [
|
|
|
232
|
+// 'first' => 1,
|
|
|
233
|
+// 'keyword1' => 2,
|
|
|
234
|
+// 'keyword2' => 2,
|
|
|
235
|
+// 'keyword3' => 2,
|
|
|
236
|
+// 'keyword4' => 2,
|
|
|
237
|
+// 'keyword5' => 2,
|
|
|
238
|
+// 'remark' => 1
|
|
|
239
|
+// ],
|
|
|
240
|
+// ]);
|
|
|
241
|
+// return $messageId;
|
235
|
}
|
242
|
}
|
236
|
} |
243
|
} |