post(); } //SOS数据发送 public function sos(){ $data = request()->post(); if(isset($data['imei']) &&!empty($data['imei'])){ try{ $info = Db::name('bracelet_device') ->where('imei',$data['imei']) ->where('del',0) ->find(); if(!empty($info)){ $insertData = [ 'imei'=>$info['imei'], 'org_id'=>$info['org_id'], 'time_begin'=>isset($data['time_begin'])?$data['time_begin']:'', 'heartrate'=>isset($data['heartrate'])?$data['heartrate']:0, 'address'=>isset($data['address'])?$data['address']:'', 'lon'=>isset($data['lon'])?$data['lon']:'', 'lat'=>isset($data['lat'])?$data['lat']:'', 'type'=>isset($data['type'])?$data['type']:0, ]; Db::name('sos_data') ->insertGetId($insertData); } }catch (Exception $e){ Log::info($e->getMessage()); } } } //心率数据发送 public function heart(){ } //计步数据发送 public function steps(){ } //睡眠数据发送 public function sleep(){ } //开关机数据发送 public function switchs(){ $data = request()->post(); file_put_contents('kaiji.txt',json_encode($data)); } //血压数据发送 public function blood(){ } //跌倒数据发送 public function tumble(){ } //提醒答复数据发送 public function remind(){ } //血氧数据发送 public function oxygen(){ } //消息通知 public function notices(){ } }