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

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

@@ -50,7 +50,9 @@ class Sos extends BaseModel
         self::beginTrans();
         try {
             if(SosBill::where('id', $where['user_id'])->where('rescuers_id',$where['rescuers_id'])->whereTime('createtime',"today")->find()) return self::setErrorInfo('已求救,不用重复发起!');
-            $res = self::create($where);
+            $where1 = $where;
+            unset($where1['from']);
+            $res = self::create($where1);
             $user_phone = User::where('id', $where['user_id'])->value('mobile');
             $rescue_phone = User::where('id', $where['rescuers_user_id'])->value('mobile');
             $rescuers_id = Rescue::where('user_id',$where['rescuers_user_id'])->value('id');