正在显示
1 个修改的文件
包含
5 行增加
和
3 行删除
| @@ -60,9 +60,11 @@ class GeoLogic extends BaseLogic | @@ -60,9 +60,11 @@ class GeoLogic extends BaseLogic | ||
| 60 | */ | 60 | */ |
| 61 | public function getGeoQuestionList($map,$page,$row,$order,$field = ['*']){ | 61 | public function getGeoQuestionList($map,$page,$row,$order,$field = ['*']){ |
| 62 | $data = $this->model->lists($map,$page,$row,$order,$field); | 62 | $data = $this->model->lists($map,$page,$row,$order,$field); |
| 63 | - foreach ($data as $key => $item){ | ||
| 64 | - $item['type_name'] = $this->model->brandType()[$item['type']]; | ||
| 65 | - $data[$key] = $item; | 63 | + if(!empty($data) && !empty($data['list'])){ |
| 64 | + foreach ($data['list'] as $key => $item){ | ||
| 65 | + $item['type_name'] = $this->model->brandType()[$item['type']]; | ||
| 66 | + $data[$key] = $item; | ||
| 67 | + } | ||
| 66 | } | 68 | } |
| 67 | return $this->success($data); | 69 | return $this->success($data); |
| 68 | } | 70 | } |
-
请 注册 或 登录 后发表评论