From 110d88d76f8862edc28070a90ddd45f38ef9d57e Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Sun, 17 Nov 2019 15:21:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A8=E5=B9=BF=E5=90=8E=E5=8F=B0=E8=A7=92?= =?UTF-8?q?=E8=89=B2=E6=9F=A5=E8=AF=A2=E7=8E=A9=E5=AE=B6=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E5=8A=A0=E5=AF=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index f05965766..828d7359e 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1743,6 +1743,25 @@ class QueryController extends BaseController } $query = M('user_play_info', 'tab_')->where($map)->order('create_time desc'); list($records, $pagination, $count) = $this->paginate($query); +// var_dump($records);die(); + foreach ($records as $key => $value) { + + //订单隐藏算法 + $orderLen = strlen($value['user_account']); + $strLen = 3; + $hideChar = ''; + + if($orderLen <=8) { + $strLen = 2; + } + + for($i = 0;$i<$orderLen-$strLen*2;$i++) { + $hideChar .='*'; + } + + $records[$key]['user_account'] = substr($value['user_account'], 0, $strLen) . $hideChar . substr($value['user_account'], $orderLen-$strLen); + + } $games = $this->getGamesByPromote($promote);