table='dinner_config'; $this->model= new \app\common\model\DinnerConfig(); } public function index(){ if(request()->isPost()){ $res = $this->model->updates(); if($res){ $this->success('操作成功',url('index')); }else{ $this->error($this->model->getError()); } }else{ $info = Db::name('dinner_config') ->where('org_id',$this->orgId) ->find(); $this->assign('info',$info); return $this->fetch(); } } }