소스 검색

新增自定义字段接口

chenxiqiang 6 년 전
부모
커밋
ecb83eca5c
1개의 변경된 파일5개의 추가작업 그리고 2개의 파일을 삭제
  1. 5
    2
      manage-server/app/Http/Controllers/CommonController.php

+ 5
- 2
manage-server/app/Http/Controllers/CommonController.php 파일 보기

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

Loading…
취소
저장