|
@@ -251,15 +251,14 @@ class WellnessRecordController extends Curd
|
|
|
// $item->wellness_record_file_array = $itemNew;
|
|
|
if (!empty($item->wellness_record_file_json)) {
|
|
|
$item->wellness_record_file_json = json_decode($item->wellness_record_file_json, true);
|
|
|
- $upload = SysUpload::whereIn('upload_file_path', $item->wellness_record_file_json)->get();
|
|
|
- $itemNew = [];
|
|
|
- foreach ($upload as $value) {
|
|
|
- $itemNew[] = [
|
|
|
- 'url' => getenv('STORAGE_DOMAIN') . $value->upload_file_path,
|
|
|
- 'name' => $value->upload_name
|
|
|
+ $wellnessRecordFileJson = [];
|
|
|
+ foreach ($item->wellness_record_file_json as $value) {
|
|
|
+ $wellnessRecordFileJson[] = [
|
|
|
+ 'url' => getenv('STORAGE_DOMAIN') . $value['url'],
|
|
|
+ 'name' => $value['name']
|
|
|
];
|
|
|
}
|
|
|
- $item->wellness_record_file_array = $itemNew;
|
|
|
+ $item->wellness_record_file_json = $wellnessRecordFileJson;
|
|
|
}
|
|
|
}
|
|
|
|