From 7ac22521ddeb3fd141768092f953df196f65fcea Mon Sep 17 00:00:00 2001 From: sunke <18850253506@163.com> Date: Tue, 14 Jan 2020 17:09:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A7=93=E5=90=8D=E5=8F=AA=E7=95=99=E5=A7=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/DownloadController.class.php | 11 ++++++----- .../Home/Controller/PromoteController.class.php | 2 ++ Application/Home/Controller/QueryController.class.php | 4 ++-- Application/Home/Controller/SafeController.class.php | 7 +++++-- Application/Home/View/default/Safe/editModify.html | 4 ++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/Application/Home/Controller/DownloadController.class.php b/Application/Home/Controller/DownloadController.class.php index 6d36d1428..9d549976e 100644 --- a/Application/Home/Controller/DownloadController.class.php +++ b/Application/Home/Controller/DownloadController.class.php @@ -2199,10 +2199,11 @@ class DownloadController extends BaseController { if($value1['status'] == 2) { $value1['promotestatus'] = "冻结中"; } - $value1['account'] = substr_replace($value1['account'],'****',2); + $realname = mb_strlen($value1['real_name'],'utf-8') == 2 ? mb_substr($value1['real_name'],0,1,'utf-8').'*':mb_substr($value1['real_name'],0,1,'utf-8').'**'; + $value1['real_name'] = $realname; $value1['idcard'] = substr_replace($value1['idcard'],'************',3,12); - $value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); - $xlsData[] = $value1; + $value1['create_time'] = date('Y-m-d H:i:s',$value1['create_time']); + $xlsData[] = $value1; } $this->exportExcel($xlsName, $xlsCell, $xlsData,$id); } @@ -3087,7 +3088,7 @@ class DownloadController extends BaseController { $records[] = [ 'id' => $parent['id'], 'account' => $parent['account'], - 'real_name' => $parent['real_name'], + 'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**', 'level' => $parent['level'], 'create_role_count' => $selfCreateRoleCountList[$parent['id']], 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], @@ -3109,7 +3110,7 @@ class DownloadController extends BaseController { $records[] = [ 'id' => $id, 'account' => $promote['account'], - 'real_name' => $promote['real_name'], + 'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**', 'level' => $promote['level'], 'create_role_count' => $createRoleCountList[$id], 'create_role_user_count' => $createRoleUserCountList[$id], diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index 36055ccf8..e08f08cdb 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -972,6 +972,8 @@ class PromoteController extends BaseController list($records, $pagination, $count) = $this->paginate($query); foreach ($records as $key => $value) { + $realname = mb_strlen($value['real_name'],'utf-8') == 2 ? mb_substr($value['real_name'],0,1,'utf-8').'*':mb_substr($value['real_name'],0,1,'utf-8').'**'; + $records[$key]['real_name'] = $realname; $records[$key]['idcard'] = encryption($value['idcard']); $records[$key]['mobile_phone'] = encryption($value['mobile_phone']); } diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 660ccec8a..b51415efc 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -2112,7 +2112,7 @@ class QueryController extends BaseController $records[] = [ 'id' => $parent['id'], 'account' => $parent['account'], - 'real_name' => $parent['real_name'], + 'real_name' => mb_strlen($parent['real_name'],'utf-8') == 2 ? mb_substr($parent['real_name'],0,1,'utf-8').'*':mb_substr($parent['real_name'],0,1,'utf-8').'**', 'level' => $parent['level'], 'create_role_count' => $selfCreateRoleCountList[$parent['id']], 'create_role_user_count' => $selfCreateRoleUserCountList[$parent['id']], @@ -2134,7 +2134,7 @@ class QueryController extends BaseController $records[] = [ 'id' => $id, 'account' => $promote['account'], - 'real_name' => $promote['real_name'], + 'real_name' => mb_strlen($promote['real_name'],'utf-8') == 2 ? mb_substr($promote['real_name'],0,1,'utf-8').'*':mb_substr($promote['real_name'],0,1,'utf-8').'**', 'level' => $promote['level'], 'create_role_count' => $createRoleCountList[$id], 'create_role_user_count' => $createRoleUserCountList[$id], diff --git a/Application/Home/Controller/SafeController.class.php b/Application/Home/Controller/SafeController.class.php index 90d4ba04b..5a26463f4 100644 --- a/Application/Home/Controller/SafeController.class.php +++ b/Application/Home/Controller/SafeController.class.php @@ -352,13 +352,16 @@ class SafeController extends BaseController{ } */ $promoteInfo = ""; $address = json_decode($rs['address'],false)[1]; + $realname = mb_strlen($rs['real_name'],'utf-8') == 2 ? mb_substr($rs['real_name'],0,1,'utf-8').'*':mb_substr($rs['real_name'],0,1,'utf-8').'**'; $this->assign('addr',$address); $this->assign('ver_status',$rs['ver_status']); $this->assign('rs',$rs); + $this->assign('idcard',encryption($rs['idcard'])); + $this->assign('real_name',$realname); $this->assign('promoteInfo',$promoteInfo); - $this->assign('tel',$rs['mobile_phone']); + $this->assign('tel',encryption($rs['mobile_phone'])); $this->display(); - } + } public function edit() { $id = get_pid(); diff --git a/Application/Home/View/default/Safe/editModify.html b/Application/Home/View/default/Safe/editModify.html index 96ab1b25d..34fd06d37 100644 --- a/Application/Home/View/default/Safe/editModify.html +++ b/Application/Home/View/default/Safe/editModify.html @@ -121,10 +121,10 @@
资质认证
- 真实姓名: {$rs['real_name']} + 真实姓名: {$real_name}
- 身份证号码: {$rs['idcard']} + 身份证号码: {$idcard}
身份证扫描: 已认证