作者 lyh

gx

@@ -36,11 +36,11 @@ class CustomModuleContentController extends BaseController @@ -36,11 +36,11 @@ class CustomModuleContentController extends BaseController
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 $data = $this->getAllCategoryName(); 38 $data = $this->getAllCategoryName();
39 - foreach ($lists as $k=>$v){ 39 + foreach ($lists['list'] as $k=>$v){
40 $v['category_name'] = $this->categoryName($v['category_id'],$data); 40 $v['category_name'] = $this->categoryName($v['category_id'],$data);
41 $v['image_link'] = getImageUrl($v['image']); 41 $v['image_link'] = getImageUrl($v['image']);
42 $v['operator_name'] = (new User())->getName($v['operator_id']); 42 $v['operator_name'] = (new User())->getName($v['operator_id']);
43 - $lists[$k] = $v; 43 + $lists['list'][$k] = $v;
44 } 44 }
45 } 45 }
46 $this->response('success',Code::SUCCESS,$lists); 46 $this->response('success',Code::SUCCESS,$lists);