Compare commits

..

3 Commits

Author SHA1 Message Date
weiz 36a8aea0fc update 2023-11-29 17:45:19 +08:00
weiz 616b38a6d7 Merge pull request 'update' (#30) from zhangwei into dev
Reviewed-on: #30
2023-11-29 17:27:53 +08:00
weiz 22706b80fd Merge pull request 'update' (#29) from zhangwei into dev
Reviewed-on: #29
2023-11-29 17:24:32 +08:00
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,10 @@
if(empty($params['plant_id']) || empty($params['type'])){ if(empty($params['plant_id']) || empty($params['type'])){
return $this->fail('缺少必要参数'); 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); return $this->success('请求成功',$data);
} }
} }