From 36a8aea0fc2b5a5442d5f752fa87b6a9f5c7be51 Mon Sep 17 00:00:00 2001 From: weiz Date: Wed, 29 Nov 2023 17:45:19 +0800 Subject: [PATCH] update --- app/api/controller/ActionController.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/api/controller/ActionController.php b/app/api/controller/ActionController.php index f5618a65..56aa407b 100644 --- a/app/api/controller/ActionController.php +++ b/app/api/controller/ActionController.php @@ -113,7 +113,10 @@ if(empty($params['plant_id']) || empty($params['type'])){ return $this->fail('缺少必要参数'); } - $data = Action::where('plant_id',$params['plant_id'])->where('type',$params['type'])->select()->toArray(); + $data = Action::where('plant_id',$params['plant_id'])->where('type',$params['type'])->select()->each(function($item){ + $item['detail'] = json_decode($item['detail'],true); + return $item; + })->toArray(); return $this->success('请求成功',$data); } } \ No newline at end of file