From a0d4583c405af827066f34fb9399b6ed2fb68d24 Mon Sep 17 00:00:00 2001 From: fengxinyhyl Date: Tue, 23 Apr 2024 14:52:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controller/api/user/User.php | 6 +++++- public/system.html | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controller/api/user/User.php b/app/controller/api/user/User.php index d20fa37..f449da4 100644 --- a/app/controller/api/user/User.php +++ b/app/controller/api/user/User.php @@ -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); } diff --git a/public/system.html b/public/system.html index 42d2fdf..5013f04 100644 --- a/public/system.html +++ b/public/system.html @@ -1,3 +1,3 @@ -加载中...
\ No newline at end of file