From bfed0ce49431f4ff460d7d70984dfcc1cee26cb4 Mon Sep 17 00:00:00 2001 From: weiz <736250432@qq.com> Date: Tue, 23 Jan 2024 17:37:26 +0800 Subject: [PATCH] update --- app/adminapi/logic/project/ProjectLogsLogic.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/adminapi/logic/project/ProjectLogsLogic.php b/app/adminapi/logic/project/ProjectLogsLogic.php index 369957d1e..083c4ffae 100644 --- a/app/adminapi/logic/project/ProjectLogsLogic.php +++ b/app/adminapi/logic/project/ProjectLogsLogic.php @@ -15,6 +15,7 @@ namespace app\adminapi\logic\project; +use app\common\model\project\Project; use app\common\model\project\ProjectLogs; use app\common\logic\BaseLogic; use think\facade\Db; @@ -116,6 +117,10 @@ class ProjectLogsLogic extends BaseLogic */ public static function detail($params): array { - return ProjectLogs::findOrEmpty($params['id'])->toArray(); + $data = ProjectLogs::findOrEmpty($params['id']); + $project = Project::field('name,project_code')->where('id',$data['project_id'])->findOrEmpty(); + $data['project_name'] = $project['name']; + $data['project_code'] = $project['project_code']; + return $data->toArray(); } } \ No newline at end of file