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