...
|
...
|
@@ -759,16 +759,17 @@ class HouseAdmin extends Api |
|
|
->page($page,$pageNum)
|
|
|
->select();
|
|
|
array_multisort(array_column($list,'createtime'),SORT_ASC,$list);
|
|
|
// 管理员头像
|
|
|
$user = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$msg['object_id']])->field('id,nickname,avatar')->find();
|
|
|
$user['avatar'] = cdnurl($user['avatar'],true);
|
|
|
// 业主头像
|
|
|
$user_model = new \app\api\model\User();
|
|
|
// 业主头像
|
|
|
$house_admin_model = new HouseAdminModel();
|
|
|
foreach ($list as &$v) {
|
|
|
if($v['type'] == 1) {
|
|
|
$user = $user_model->field('id,nickname,avatar')->where('id',$v['user_id'])->find();
|
|
|
$user['avatar'] = cdnurl($user['avatar']);
|
|
|
}else{
|
|
|
$user = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$msg['object_id']])->field('id,nickname,avatar')->find();
|
|
|
}
|
|
|
$user['avatar'] = cdnurl($user['avatar'],true);
|
|
|
$v['user'] = $user;
|
|
|
}
|
|
|
$this->success('success',compact('total_num','list'));
|
...
|
...
|
|