作者 lyh

gx

... ... @@ -52,11 +52,10 @@ class ProductController extends BaseController
$query = $product->orderBy($this->order ,'desc')->orderBy('id','desc');
$query = $this->searchParam($query);
$lists = $query->select($filed)->paginate($this->row, ['*'], 'page', $this->page);
if(!empty($lists)){
if(!empty($lists) && !empty($lists['list'])){
$lists = $lists->toArray();
$cate_data = $this->getCategoryList();//分类
$key_data = $this->keywordNameLists($lists['list']);//关键字
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($key_data, true) . PHP_EOL, FILE_APPEND);
$template_id = $this->getTemplateId(BTemplate::SOURCE_PRODUCT,BTemplate::IS_DETAIL);//获取模版id
$userModel = new User();
foreach ($lists['list'] as $k=>$v){
... ...