作者 何书鹏
1 个管道 的构建 通过 耗费 1 秒

合并分支 'heshupeng' 到 'master'

管理员回复头像



查看合并请求 !410
... ... @@ -868,13 +868,16 @@ class HouseAdmin extends Api
array_multisort(array_column($list,'createtime'),SORT_ASC,$list);
// 业主头像
$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();
}else{
$user = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$msg['object_id']])->field('id,nickname,avatar')->find();
// 多管理员
if(!$user){
$house = House::get($msg['object_id']);
$user = HouseAdminModel::where(['id'=>$house['admin_user_id'],'user_id'=>$this->auth->id])->field('id,nickname,avatar')->find();
}
}
$user['avatar'] = cdnurl($user['avatar'],true);
$v['user'] = $user;
... ...