From e5d425cd477b7e840653a9985bb8cfad0533d44a Mon Sep 17 00:00:00 2001 From: zhengyongxing Date: Fri, 15 Nov 2019 14:17:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A2=E5=8D=95=E6=9F=A5=E8=AF=A2=E8=AE=A2?= =?UTF-8?q?=E5=8D=95=E4=BF=A1=E6=81=AF=E9=9A=90=E8=97=8F=EF=BC=8C=E6=89=B6?= =?UTF-8?q?=E6=8C=81=E5=8F=B7=E7=AE=A1=E7=90=86=E6=9B=B4=E5=90=8D=E4=B8=BA?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Home/Controller/QueryController.class.php | 15 +++++++++++++++ .../Home/View/default/Public/promote_base.html | 2 +- Application/Home/View/default/Query/recharge.html | 4 ++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index 10849c2bd..30e1a9459 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -153,6 +153,21 @@ class QueryController extends BaseController } $list['user_account'] = substr($list['user_account'], 0, 2) . '******' . substr($list['user_account'], 8); + + //订单隐藏算法 + $orderLen = strlen($list['order_number']); + $strLen = 4; + $hideChar = ''; + + if($orderLen <=8) { + $strLen = 2; + } + + for($i = 0;$i<$orderLen-$strLen*2;$i++) { + $hideChar .='*'; + } + + $list['order_number'] = substr($list['order_number'], 0, $strLen) . $hideChar . substr($list['order_number'], $orderLen-$strLen); } } diff --git a/Application/Home/View/default/Public/promote_base.html b/Application/Home/View/default/Public/promote_base.html index de6ecd1e7..67f1319b4 100644 --- a/Application/Home/View/default/Public/promote_base.html +++ b/Application/Home/View/default/Public/promote_base.html @@ -104,7 +104,7 @@ + 游戏订单 支付方式 订单金额 游戏名称 @@ -189,7 +189,7 @@ {$vo.user_account} - + {$vo.order_number} {:get_pay_way($vo['pay_way'])} {$vo.pay_amount} {$vo.game_name}