优化代码

main
fengxinyhyl 7 months ago
parent 1f65e5c2d4
commit a0d4583c40
  1. 6
      app/controller/api/user/User.php
  2. 2
      public/system.html

@ -333,12 +333,16 @@ class User extends BaseController
$data = $this->repository->getOneLevelList($uid, $keyword, 'create_time', $page, $limit);
$spread = $this->repository->get($user['spread_uid']);
if($spread){
$data['spread'] = array('uid' => $spread['uid'], 'avatar' => $spread['avatar'],
$data['spread'] = array('uid' => $spread['uid'], 'avatar' => $spread['avatar'],
'nickname' => $spread['nickname'], 'phone' => $spread['phone']);
}else{
$data['spread'] = null;
}
foreach ($data['list'] as &$item){
$item['phone'] = substr($item['phone'], 0, 3).'****'.substr($item['phone'], -4);
}
return app('json')->success($data);
}

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save