getList($this->postData()); // 商品分类 $category = CategoryModel::getCacheTree(); return $this->renderSuccess('', compact('list', 'category')); } /** *商品推荐 */ public function editProduct($product_id) { $model = new ReduceModel; // 更新记录 if ($model->edit($this->postData(), $this->getSupplierId())) { return $this->renderSuccess('修改成功'); } return $this->renderError($model->getError()?:'修改失败'); } }