正在显示
1 个修改的文件
包含
12 行增加
和
4 行删除
| @@ -13,8 +13,12 @@ class ProcessRecords extends Base | @@ -13,8 +13,12 @@ class ProcessRecords extends Base | ||
| 13 | 13 | ||
| 14 | public function setRecordAttribute($value){ | 14 | public function setRecordAttribute($value){ |
| 15 | foreach ($value as &$v){ | 15 | foreach ($value as &$v){ |
| 16 | - $v['image'] = basename($v['image']); | ||
| 17 | - $v['file'] = basename($v['file']); | 16 | + foreach ($v['image'] as $kImage => $vImage){ |
| 17 | + $v['image'][$kImage] = basename($vImage['image']); | ||
| 18 | + } | ||
| 19 | + foreach ($v['file'] as $kFile => $vFile){ | ||
| 20 | + $v['file'][$kFile] = basename($vFile['file']); | ||
| 21 | + } | ||
| 18 | } | 22 | } |
| 19 | $this->attributes['record'] = Arr::a2s($value); | 23 | $this->attributes['record'] = Arr::a2s($value); |
| 20 | } | 24 | } |
| @@ -22,8 +26,12 @@ class ProcessRecords extends Base | @@ -22,8 +26,12 @@ class ProcessRecords extends Base | ||
| 22 | public function getRecordAttribute($value){ | 26 | public function getRecordAttribute($value){ |
| 23 | $value = Arr::s2a($value); | 27 | $value = Arr::s2a($value); |
| 24 | foreach ($value as &$v){ | 28 | foreach ($value as &$v){ |
| 25 | - $v['image'] = getImageUrl($v['image']); | ||
| 26 | - $v['file'] = getFileUrl($v['file']); | 29 | + foreach ($v['image'] as $kImage => $vImage){ |
| 30 | + $v['image'][$kImage] = getImageUrl($v['image']); | ||
| 31 | + } | ||
| 32 | + foreach ($v['file'] as $kFile => $vFile){ | ||
| 33 | + $v['file'][$kFile] = getFileUrl($v['file']); | ||
| 34 | + } | ||
| 27 | } | 35 | } |
| 28 | return $value; | 36 | return $value; |
| 29 | } | 37 | } |
-
请 注册 或 登录 后发表评论