作者 Cool

子管理员添加接口修改

@@ -482,6 +482,7 @@ class HouseAdmin extends Api @@ -482,6 +482,7 @@ class HouseAdmin extends Api
482 $this->error(__('Mobile is incorrect')); 482 $this->error(__('Mobile is incorrect'));
483 } 483 }
484 $user = $this->auth->getUser(); 484 $user = $this->auth->getUser();
  485 + $post['user_id'] = $user['id'];
485 $admin = HouseAdminModel::get(['user_id'=>$user['id'],'house_id'=>$post['house_id'],'is_direct'=>1]); 486 $admin = HouseAdminModel::get(['user_id'=>$user['id'],'house_id'=>$post['house_id'],'is_direct'=>1]);
486 empty($admin) && $this->error('您不是该小区的主管理员'); 487 empty($admin) && $this->error('您不是该小区的主管理员');
487 (new HouseAdminModel)->allowField(true)->save(array_merge([ 488 (new HouseAdminModel)->allowField(true)->save(array_merge([