作者 lyh

gx

@@ -32,6 +32,7 @@ class NewsController extends BaseController @@ -32,6 +32,7 @@ class NewsController extends BaseController
32 $query = $this->searchParam($query); 32 $query = $this->searchParam($query);
33 $lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page); 33 $lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page);
34 if(!empty($lists) && !empty($lists['list'])){ 34 if(!empty($lists) && !empty($lists['list'])){
  35 + $lists = $lists->toArray();
35 //获取当前项目的所有分类 36 //获取当前项目的所有分类
36 $data = $this->getCategoryList(); 37 $data = $this->getCategoryList();
37 $user = new User(); 38 $user = new User();
@@ -48,6 +48,7 @@ class ProductController extends BaseController @@ -48,6 +48,7 @@ class ProductController extends BaseController
48 $query = $this->searchParam($query); 48 $query = $this->searchParam($query);
49 $lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page); 49 $lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page);
50 if(!empty($lists) && !empty($lists['list'])){ 50 if(!empty($lists) && !empty($lists['list'])){
  51 + $lists = $lists->toArray();
51 $cate_data = $this->getCategoryList();//分类 52 $cate_data = $this->getCategoryList();//分类
52 $key_data = $this->getKeywordsList();//关键字 53 $key_data = $this->getKeywordsList();//关键字
53 //获取当前用户选择的模版 54 //获取当前用户选择的模版