Browse Source

修改注册用户时,默认is_open字段

刘远航 4 years ago
parent
commit
8e154dcfaa
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/Helpers/functions.php

+ 5 - 1
app/Helpers/functions.php

xqd
@@ -622,15 +622,19 @@ if (!function_exists('send_wechat_message_to_docter')) {
 if (!function_exists('send_wechatSubscription_message')) {
     function send_wechatSubscription_message($type, $arr,$message='docter_wechat_small_program')
     {
+        trace(['模板消息进入数据类型' =>$type , '请求参数' => $arr ?? '', '模板标识' => $message ?? ''], 'lyh_info');
+
         try {
             $app = Factory::miniProgram(config('config.'.$message));
             $data = config('config.wechatSubscription_template')[$type];
+            trace(['模板消息进入数据类型' =>$type , '请求参数' => $arr ?? '', '模板' => $data ?? ''], 'lyh_info');
+
             $json = json_encode($data, JSON_UNESCAPED_UNICODE);
             $json = vsprintf($json, $arr);
             $data = json_decode($json, true);
             $result = $app->uniform_message->send($data);
         } catch (Exception $e) {
-            trace(['发送微信模板消息失败' => $e->getMessage(), '请求参数' => $data ?? '', '返回数据' => $result ?? ''], 'error');
+            trace(['发送微信模板消息失败' => $e->getMessage(), '请求参数' => $data ?? '', '返回数据' => $result ?? ''], 'lyh_error');
         }
         return $result ?? false;
     }