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

管理员手机号显示

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