| 1234567891011121314151617181920212223242526272829303132 | 
							- <?php
 
- namespace app\admin\controller;
 
- use think\App;
 
- use think\Db;
 
- class DinnerConfig extends Auth
 
- {
 
-     public function __construct(App $app = null) {
 
-         parent::__construct($app);
 
-         $this->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();
 
-         }
 
-     }
 
- }
 
 
  |