再来一单
This commit is contained in:
@@ -24,37 +24,6 @@ class Business
|
||||
Redis::setEx($set_str, 30 * 86400, json_encode([$set_info_str]));
|
||||
}
|
||||
Redis::setEx($set_info_str, 30 * 86400, json_encode($data));
|
||||
|
||||
|
||||
if($open_id) {
|
||||
|
||||
// 保存的同时发送模版消息通知用户有未读消息
|
||||
$config = [
|
||||
'app_id' => config('cons.app_id'),
|
||||
'secret' => config('cons.secret'),
|
||||
'response_type' => 'array',
|
||||
];
|
||||
$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([
|
||||
'touser' => $open_id,
|
||||
'template_id' => 'hGsUGZlWqWC9TMm4ZGZuz0OwE4gwSmvgbr5ecmTDvq4',
|
||||
'miniprogram' => [
|
||||
'appid' => 'wxd88fffa983758a30', // 零点八零
|
||||
'pagepath' => 'pages/index/index', // 零点八零
|
||||
],
|
||||
'data' => [
|
||||
'thing7' => $record['shop_name'],
|
||||
'thing14' => $record['activity_detail'],
|
||||
'time3' => $record['activity_time'],
|
||||
'thing16' => $record['address'],
|
||||
],
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// 拉消息
|
||||
|
||||
Reference in New Issue
Block a user