attributes = get_params(); $form->store_id = get_store_id(); $form->user = get_user(); return $this->asJson($form->getList()); } /** * 添加帖子 */ public function actionSave() { $form = new CommunityForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); $form->user = get_user(); return $this->asJson($form->save()); } /** * 删除帖子 */ public function actionDel() { $form = new CommunityForm(); $form->attributes = post_params(); $form->store_id = get_store_id(); $form->user = get_user(); return $this->asJson($form->del()); } }