zxhxx 3 سال پیش
والد
کامیت
35040e752c
2فایلهای تغییر یافته به همراه8 افزوده شده و 1 حذف شده
  1. 2 1
      application/common/model/Sos.php
  2. 6 0
      extend/liuniu/WechatService.php

+ 2 - 1
application/common/model/Sos.php

@@ -66,8 +66,9 @@ class Sos extends BaseModel
                 $data['keyword3'] = date("Y-m-d H:i:s");
                 $data['keyword4'] = "";
                 $data['remark'] ="详细请点信息";
+                @file_put_contents("sos.txt",json_encode($data)."\r\n");
                $rs =  WechatTempleService::sendTemplate($where['cid'], UserRelation::userIdToOpenId('rescuers_user_id'), WechatTempleService::EMERGANCY_RESCUE,$data,$where['re_url']);
-                @file_put_contents("sos.txt",json_encode($rs));
+                @file_put_contents("sos.txt",json_encode($rs)."\r\n",8);
             }
             if($res && $res1)
             {

+ 6 - 0
extend/liuniu/WechatService.php

@@ -265,6 +265,12 @@ class WechatService
     public static function sendTemplate($openid, $templateId, array $data, $url = null,$cid=0)
     {
         $notice = self::noticeService($cid);
+        @file_put_contents("sos.txt",json_encode([
+            'touser' => $openid,
+            'template_id' => $templateId,
+            'url' => $url,
+            'data' => $data,
+        ])."\r\n",8);
         return $notice->send([
             'touser' => $openid,
             'template_id' => $templateId,