gogs 1 год назад
Родитель
Сommit
6d7ea958b9
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      app/Http/Controllers/Api/DeviceController.php

+ 5 - 0
app/Http/Controllers/Api/DeviceController.php

@@ -65,6 +65,11 @@ class DeviceController extends Controller
     public function addperson(Request $request){
         $data = $request->all();
         Log::channel('apiLog')->info('smkq-addperson', ['data' => $data]);
+        $json = json_decode('{"transaction_id":"20220829142124067","api":"heartbeat","records":[],"interval":"10000","result_code":0,"noncestr":"be39ff7eadc0450b91f0713c3382cd22","time":"1661754084","sign":"9ab968049901cd4e493baeec1dcf85fe","result_msg":"OK"}',true);
+        $json['transaction_id'] = date('YmdHis').rand(1000,9999);
+        $json['time'] = time();
+
+        echo json_encode($json);
     }