|
@@ -544,13 +544,13 @@ if (!function_exists('send_wechat_message')) {
|
|
$data = json_decode($json, true);
|
|
$data = json_decode($json, true);
|
|
$ret = $app->uniform_message->send($data);
|
|
$ret = $app->uniform_message->send($data);
|
|
//如果模板消息发送失败(可能因用户没有关注公众号而失败)再发送订阅消息
|
|
//如果模板消息发送失败(可能因用户没有关注公众号而失败)再发送订阅消息
|
|
- if (isset($ret['errcode']) && $ret['errcode'] != 0) {
|
|
|
|
|
|
+ /*if (isset($ret['errcode']) && $ret['errcode'] != 0) {
|
|
$data = config('config.wechat_subscribe_message_template')[$type];
|
|
$data = config('config.wechat_subscribe_message_template')[$type];
|
|
$json = json_encode($data, JSON_UNESCAPED_UNICODE);
|
|
$json = json_encode($data, JSON_UNESCAPED_UNICODE);
|
|
$json = vsprintf($json, $subscribe_arr);
|
|
$json = vsprintf($json, $subscribe_arr);
|
|
$data = json_decode($json, true);
|
|
$data = json_decode($json, true);
|
|
$ret = $app->subscribe_message->send($data);
|
|
$ret = $app->subscribe_message->send($data);
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
} catch (Exception $e) {
|
|
} catch (Exception $e) {
|
|
trace(['发送微信消息失败' => $e->getMessage(), '请求参数' => $data ?? '', '返回数据' => $ret ?? ''], 'error');
|
|
trace(['发送微信消息失败' => $e->getMessage(), '请求参数' => $data ?? '', '返回数据' => $ret ?? ''], 'error');
|
|
}
|
|
}
|