作者 Cool

用户首页接口优化

@@ -174,7 +174,9 @@ class User extends Api @@ -174,7 +174,9 @@ class User extends Api
174 ->order(['is_direct'=>'asc','createtime'=>'asc']) 174 ->order(['is_direct'=>'asc','createtime'=>'asc'])
175 ->field('id,house_id,is_direct,nickname,avatar') 175 ->field('id,house_id,is_direct,nickname,avatar')
176 ->find(); 176 ->find();
177 - if(!$info) { 177 + if($info) {
  178 + $user['identity'] = 1;
  179 + } else {
178 $user['identity'] = 0; 180 $user['identity'] = 0;
179 } 181 }
180 $this->success('成功', array_merge($user,$data)); 182 $this->success('成功', array_merge($user,$data));