From 765f78cfaf9412f0f413b410af5cd4c32eb5bfff Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Thu, 11 Jan 2024 11:09:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/project/controller/Project.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/application/project/controller/Project.php b/application/project/controller/Project.php index 24a05e6..c4ea43e 100755 --- a/application/project/controller/Project.php +++ b/application/project/controller/Project.php @@ -581,11 +581,13 @@ class Project extends BasicApi } $data=[]; foreach($select as $k=>$v){ + $find=Db::name('positioning')->where(['member_code'=>$v['member_code']])->order('date desc')->field('positioning,date')->find(); $data[]=[ 'name'=>$v['name'], 'avatar'=>$v['avatar'], 'member_code'=>$v['member_code'], - 'positioning'=>Db::name('positioning')->where(['member_code'=>$v['member_code']])->order('date desc')->value('positioning'), + 'positioning'=>$find['positioning']??'', + 'date'=>$find['date']??'', ]; } $this->success('',$data);