model = new \app\common\model\Complain(); } public function add(){ $info = [ 'orgId'=>$this->orgId, 'depId'=>input('depId/d',0), 'createUserId'=>$this->userId, 'hide'=>input('hide',0), 'content'=>input('content',''), 'images'=>input('images',''), 'voices'=>input('voices',''), 'videos'=>input('videos',''), ]; $ret=$this->model->addSave($info); if($ret){ HelpHander::success([],'添加成功'); }else{ HelpHander::error($this->model->getError()); } } public function selectAllByOrgId(){ $page=input('page/d',1); $size=input('size/d',10); $ret=$this->model->lists($page,$size,$this->orgId,$this->userId); HelpHander::success($ret); } public function detail(){ $id=input('id'); $ret=$this->model->detail($id); if($ret){ HelpHander::success($ret); }else{ HelpHander::error('暂无数据'); } } public function lists(){ $type = input('type/d',0); // 0=全部 1=超时 $page=input('page/d',1); $size=input('size/d',10); $ret=$this->model->alllists($page,$size,$type,$this->orgId); HelpHander::success($ret); } }