From 6c44769642f32a8e8a849754b29d3bf83bca98bf Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Mon, 13 Nov 2023 17:47:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/adminapi/lists/custom/CustomContactsLists.php | 1 - app/adminapi/logic/custom/CustomContactsLogic.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/adminapi/lists/custom/CustomContactsLists.php b/app/adminapi/lists/custom/CustomContactsLists.php index e441e8bb6..777d64756 100644 --- a/app/adminapi/lists/custom/CustomContactsLists.php +++ b/app/adminapi/lists/custom/CustomContactsLists.php @@ -57,7 +57,6 @@ class CustomContactsLists extends BaseAdminDataLists implements ListsSearchInter return CustomContacts::where($this->searchWhere) ->field(['id', 'custom_id', 'name', 'position', 'phone', 'telephone', 'email', 'notes', 'annex', 'status']) ->limit($this->limitOffset, $this->limitLength) - ->with(['customName']) ->order(['id' => 'desc']) ->select() ->toArray(); diff --git a/app/adminapi/logic/custom/CustomContactsLogic.php b/app/adminapi/logic/custom/CustomContactsLogic.php index c44afeff4..91781dd99 100644 --- a/app/adminapi/logic/custom/CustomContactsLogic.php +++ b/app/adminapi/logic/custom/CustomContactsLogic.php @@ -117,6 +117,6 @@ class CustomContactsLogic extends BaseLogic */ public static function detail($params): array { - return CustomContacts::findOrEmpty($params['id'])->toArray(); + return CustomContacts::with(['customName'])->findOrEmpty($params['id'])->toArray(); } } \ No newline at end of file