add(); HelpHander::success([],'操作成功'); } // 编辑 public function update(){ model('DinnerCate')->add(); HelpHander::success([],'操作成功'); } public function detail(){ $id = input('id/d',0); $ret = model('DinnerCate')->info($id); HelpHander::success($ret); } // 列表 public function list(){ $page = input('page/d',1); $size = input('size/d',10); $title = input('title','','trim'); $enable = input('enable/d',-1); $ret = model('DinnerCate')->lists($page,$size,$title,$enable); HelpHander::success($ret); } public function all(){ $ret = model('DinnerCate')->allLists(); HelpHander::success($ret); } // 删除 public function del(){ $id = input('id/d',0); model('DinnerCate')->del($id); HelpHander::success([],'操作成功'); } }