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

管理员手机号显示

... ... @@ -92,6 +92,7 @@ class HouseAdmin extends Backend
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.add' : $name) : $this->modelValidate;
$this->model->validateFailException(true)->validate($validate);
}
$params['avatar'] = Db::name('user')->where('id',$data['user_id'])->value('avatar');
$result = $this->model->allowField(true)->save($params);
$house_admin_id = $this->model->getLastInsID();
... ... @@ -153,6 +154,7 @@ class HouseAdmin extends Backend
$validate = is_bool($this->modelValidate) ? ($this->modelSceneValidate ? $name . '.edit' : $name) : $this->modelValidate;
$row->validateFailException(true)->validate($validate);
}
$params['avatar'] = Db::name('user')->where('id',$data['user_id'])->value('avatar');
$result = $row->allowField(true)->save($params);
Db::commit();
} catch (ValidateException $e) {
... ...
... ... @@ -136,7 +136,7 @@ class HouseAdmin extends Api
{
$house_id = $this->request->param('house_id');
empty($house_id) && $this->error('缺少必要参数');
$info = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$house_id])->field('id,nickname,avatar')
$info = HouseAdminModel::where(['user_id'=>$this->auth->id,'house_id'=>$house_id])->field('id,nickname,avatar,mobile')
->find();
$info['avatar'] = cdnurl($info['avatar'],true);
$this->success('success',$info);
... ...