微信模版消息
This commit is contained in:
@@ -95,6 +95,10 @@ class SendWechatTemp implements Consumer
|
|||||||
'response_type' => 'array',
|
'response_type' => 'array',
|
||||||
];
|
];
|
||||||
$app = Factory::officialAccount($config);
|
$app = Factory::officialAccount($config);
|
||||||
|
$acc_token = Redis::get('wx:ac:AccessToken');
|
||||||
|
if($acc_token) {
|
||||||
|
$app['access_token']->setToken($acc_token);
|
||||||
|
}
|
||||||
$wechat_res = $app->template_message->send([
|
$wechat_res = $app->template_message->send([
|
||||||
'touser' => $user['wechat_ac_open_id'],
|
'touser' => $user['wechat_ac_open_id'],
|
||||||
'template_id' => 'hGsUGZlWqWC9TMm4ZGZuz0OwE4gwSmvgbr5ecmTDvq4',
|
'template_id' => 'hGsUGZlWqWC9TMm4ZGZuz0OwE4gwSmvgbr5ecmTDvq4',
|
||||||
|
|||||||
Reference in New Issue
Block a user