...
|
...
|
@@ -178,6 +178,10 @@ class HouseAdmin extends Api |
|
|
empty($house_id) && $this->error('缺少必要参数');
|
|
|
$info = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$house_id])->field('id,nickname,avatar,mobile')
|
|
|
->find();
|
|
|
if(!$info){
|
|
|
$admin_user_id = House::where('id',$house_id)->value('admin_user_id');
|
|
|
$info = HouseAdminModel::where(['id'=>$admin_user_id,'user_id'=>$this->auth->id])->field('id,nickname,avatar,mobile')->find();
|
|
|
}
|
|
|
$info['avatar'] = cdnurl($info['avatar'],true);
|
|
|
$this->success('success',$info);
|
|
|
}
|
...
|
...
|
|