zxhxx 3 years ago
parent
commit
5bfd4d4402
1 changed files with 2 additions and 2 deletions
  1. 2 2
      application/common/model/Sos.php

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

@@ -52,8 +52,8 @@ class Sos extends BaseModel
             $res = self::create($where);
             $user_phone = User::where('id', $where['user_id'])->value('mobile');
             $rescue_phone = User::where('id', $where['rescuers_user_id'])->value('mobile');
-            $res1 = SosBill::income($where['cid'], $where['user_id'], $res['id'], $where['rescuers_id'],$where['rescuers_user_id'], $where['latitude'], $where['longitude'], $user_phone, $rescue_phone,$where['address']);
-
+            $rescuers_id = Rescue::where('uid',$where['rescuers_user_id'])->value('id');
+            $res1 = SosBill::income($where['cid'], $where['user_id'], $res['id'], $rescuers_id,$where['rescuers_user_id'], $where['latitude'], $where['longitude'], $user_phone, $rescue_phone,$where['address']);
             //tudo 模板信息
             if($res && $res1)
             {