医生接诊台
This commit is contained in:
@@ -47,9 +47,6 @@ class DoctorNoteLogic extends BaseLogic
|
||||
$prev = [];
|
||||
}
|
||||
$merged = array_values(array_unique(array_merge($prev, $newImages)));
|
||||
if (count($merged) > 9) {
|
||||
$merged = array_slice($merged, 0, 9);
|
||||
}
|
||||
$data['tongue_images'] = json_encode($merged, JSON_UNESCAPED_UNICODE);
|
||||
}
|
||||
|
||||
@@ -93,8 +90,6 @@ class DoctorNoteLogic extends BaseLogic
|
||||
->select()
|
||||
->toArray();
|
||||
|
||||
$domain = request()->domain();
|
||||
|
||||
foreach ($records as &$record) {
|
||||
$images = $record['tongue_images'] ?? [];
|
||||
if (is_string($images)) {
|
||||
@@ -103,13 +98,7 @@ class DoctorNoteLogic extends BaseLogic
|
||||
if (!is_array($images)) {
|
||||
$images = [];
|
||||
}
|
||||
$record['tongue_images'] = array_map(function ($url) use ($domain) {
|
||||
if (empty($url)) return $url;
|
||||
if (stripos($url, 'http://') === 0 || stripos($url, 'https://') === 0) {
|
||||
return $url;
|
||||
}
|
||||
return $domain . '/' . $url;
|
||||
}, $images);
|
||||
$record['tongue_images'] = $images;
|
||||
}
|
||||
|
||||
return $records;
|
||||
|
||||
Reference in New Issue
Block a user