正在显示
1 个修改的文件
包含
4 行增加
和
3 行删除
| @@ -35,11 +35,12 @@ class CustomModuleContentController extends BaseController | @@ -35,11 +35,12 @@ class CustomModuleContentController extends BaseController | ||
| 35 | $lists = $customModuleContent->lists($this->map,$this->page,$this->row,$this->order); | 35 | $lists = $customModuleContent->lists($this->map,$this->page,$this->row,$this->order); |
| 36 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($lists, true) . PHP_EOL, FILE_APPEND); | 36 | @file_put_contents(storage_path('logs/lyh_error.log'), var_export($lists, true) . PHP_EOL, FILE_APPEND); |
| 37 | if(!empty($lists)){ | 37 | if(!empty($lists)){ |
| 38 | + $lists = $lists->toArray(); | ||
| 38 | $data = $this->getAllCategoryName(); | 39 | $data = $this->getAllCategoryName(); |
| 39 | foreach ($lists as $k=>$v){ | 40 | foreach ($lists as $k=>$v){ |
| 40 | - $v['category_name'] = $this->categoryName($v->category_id,$data); | ||
| 41 | - $v['image_link'] = getImageUrl($v->image); | ||
| 42 | - $v['operator_name'] = (new User())->getName($v->operator_id); | 41 | + $v['category_name'] = $this->categoryName($v['category_id'],$data); |
| 42 | + $v['image_link'] = getImageUrl($v['image']); | ||
| 43 | + $v['operator_name'] = (new User())->getName($v['operator_id']); | ||
| 43 | $lists[$k] = $v; | 44 | $lists[$k] = $v; |
| 44 | } | 45 | } |
| 45 | } | 46 | } |
-
请 注册 或 登录 后发表评论