正在显示
1 个修改的文件
包含
16 行增加
和
0 行删除
| @@ -184,23 +184,39 @@ class Project extends Base | @@ -184,23 +184,39 @@ class Project extends Base | ||
| 184 | 184 | ||
| 185 | public function setNoticeFileAttribute($value) | 185 | public function setNoticeFileAttribute($value) |
| 186 | { | 186 | { |
| 187 | + foreach ($value as &$v) { | ||
| 188 | + $v = basename($v); | ||
| 189 | + } | ||
| 187 | $this->attributes['notice_file'] = Arr::a2s($value); | 190 | $this->attributes['notice_file'] = Arr::a2s($value); |
| 188 | } | 191 | } |
| 189 | 192 | ||
| 190 | public function getNoticeFileAttribute($value) | 193 | public function getNoticeFileAttribute($value) |
| 191 | { | 194 | { |
| 192 | $value = Arr::s2a($value); | 195 | $value = Arr::s2a($value); |
| 196 | + if(!empty($value)) { | ||
| 197 | + foreach ($value as &$v) { | ||
| 198 | + $v = getImageUrl($v); | ||
| 199 | + } | ||
| 200 | + } | ||
| 193 | return $value; | 201 | return $value; |
| 194 | } | 202 | } |
| 195 | 203 | ||
| 196 | public function setConfirmFileAttribute($value) | 204 | public function setConfirmFileAttribute($value) |
| 197 | { | 205 | { |
| 206 | + foreach ($value as &$v) { | ||
| 207 | + $v = basename($v); | ||
| 208 | + } | ||
| 198 | $this->attributes['confirm_file'] = Arr::a2s($value); | 209 | $this->attributes['confirm_file'] = Arr::a2s($value); |
| 199 | } | 210 | } |
| 200 | 211 | ||
| 201 | public function getConfirmFileAttribute($value) | 212 | public function getConfirmFileAttribute($value) |
| 202 | { | 213 | { |
| 203 | $value = Arr::s2a($value); | 214 | $value = Arr::s2a($value); |
| 215 | + if(!empty($value)) { | ||
| 216 | + foreach ($value as &$v) { | ||
| 217 | + $v = getImageUrl($v); | ||
| 218 | + } | ||
| 219 | + } | ||
| 204 | return $value; | 220 | return $value; |
| 205 | } | 221 | } |
| 206 | 222 |
-
请 注册 或 登录 后发表评论