attributes = get_params(); $res = $form->search(); return $this->asJson($res); } /** * @return \yii\web\Response * 保存信息 */ public function actionSave() { $form = new PtActivityGoodsCatForm(); $form->attributes = post_params(); $res = $form->save(); return $this->asJson($res); } /** * @return \yii\web\Response * 修改状态 */ public function actionSetStatus() { $form = new PtActivityGoodsCatForm(); $form->attributes = get_params(); $res = $form->setStatus(); return $this->asJson($res); } }