model = new \app\common\model\Comment(); } public function add(){ $jsonArray=[ 'score'=>input('score'), 'content'=>input('content'), 'userId'=>$this->userId, 'type'=>input('type'), 'fromId'=>input('fromId'), 'orgId'=>$this->orgId ]; $ret=$this->model->addSave($jsonArray); if($ret){ HelpHander::success([],'添加成功'); }else{ HelpHander::error($this->model->getError()); } } public function detail(){ $id = input('id'); $ret = $this->model->details($id); if($ret){ HelpHander::success($ret); }else{ HelpHander::error('暂无信息'); } } public function list(){ $page = input('page/d',1); $size = input('size/d',20); $ret = $this->model->lists($this->userId,$this->orgId,$page,$size); HelpHander::success($ret); } }