getList($this->postData()); return $this->renderSuccess('', compact('list')); } /** * 编辑分销商 */ public function edit($shop_supplier_id) { $model = new TakeSupplierModel(); if ($this->request->isGet()) { $supplier= TakeSupplierModel::detail($shop_supplier_id); return $this->renderSuccess('', compact('supplier')); } if ($model->edit($this->postData())) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败'); } /** * 设置状态 */ public function setStatus($ids, $is_takeout) { $model = new TakeSupplierModel(); if ($model->setStatus($ids, $is_takeout)) { return $this->renderSuccess('操作成功'); } return $this->renderError($model->getError() ?: '操作失败'); } }