data_post['user_id'] = isset($this->user['id']) ? $this->user['id'] : 0; SearchService::SearchAdd($this->data_post); // 获取数据 $ret = SearchService::GoodsList($this->data_post); // 分类 if(!empty($this->data_post['category_id'])) { $ret['data']['category'] = GoodsService::GoodsCategoryRow(['id'=>$this->data_post['category_id']]); } else { $ret['data']['category'] = []; } return $ret; } } ?>