Przeglądaj źródła

新增自定义字段接口

chenxiqiang 6 lat temu
rodzic
commit
ecb83eca5c

+ 5
- 2
manage-server/app/Http/Controllers/CommonController.php Wyświetl plik

374
         $order_type = $request->route("order_type");
374
         $order_type = $request->route("order_type");
375
         if ($id && $order_type) {
375
         if ($id && $order_type) {
376
             $record = $this->getRecord($order_type, $id);
376
             $record = $this->getRecord($order_type, $id);
377
+            $comment = Comment::where("order_type", $order_type)->where("order_id", $id)->first();
377
             if ($record) {
378
             if ($record) {
378
-                return Response()->json([
379
+                $ret = [
379
                     "status" => 0,
380
                     "status" => 0,
380
                     "data" => $record
381
                     "data" => $record
381
-                ]);
382
+                ];
383
+                $ret["data"]["comment"] = $comment->content;
384
+                return Response()->json($ret);
382
             }
385
             }
383
             return Response()->json([
386
             return Response()->json([
384
                 "status" => -2,
387
                 "status" => -2,

Loading…
Anuluj
Zapisz