正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
| @@ -341,9 +341,11 @@ class ImageController extends Controller | @@ -341,9 +341,11 @@ class ImageController extends Controller | ||
| 341 | public function getImageList(){ | 341 | public function getImageList(){ |
| 342 | $imageModel = new ImageModel(); | 342 | $imageModel = new ImageModel(); |
| 343 | $lists = $imageModel->lists($this->map,$this->page,$this->row,$order = 'id'); | 343 | $lists = $imageModel->lists($this->map,$this->page,$this->row,$order = 'id'); |
| 344 | - foreach ($lists as $k => $v){ | ||
| 345 | - $v['image_link'] = getImageUrl($v['hash']); | ||
| 346 | - $lists[$k] = $v; | 344 | + if(!empty($lists) && !empty($lists['list'])){ |
| 345 | + foreach ($lists['list'] as $k => $v){ | ||
| 346 | + $v['image_link'] = getImageUrl($v['hash']); | ||
| 347 | + $lists['list'][$k] = $v; | ||
| 348 | + } | ||
| 347 | } | 349 | } |
| 348 | $this->response('success',Code::SUCCESS,$lists); | 350 | $this->response('success',Code::SUCCESS,$lists); |
| 349 | } | 351 | } |
-
请 注册 或 登录 后发表评论