diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 7bd15abbc..6f38130b5 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -2856,3 +2856,20 @@ function getIsTask($user_id){ return $shiftres['id']; } } + +function encryption($string) { + //订单隐藏算法 + $orderLen = strlen($string); + $strLen = 3; + $hideChar = ''; + + if($orderLen <=8) { + $strLen = 2; + } + + for($i = 0;$i<$orderLen-$strLen*2;$i++) { + $hideChar .='*'; + } + + return substr($string, 0, $strLen) . $hideChar . substr($string, $orderLen-$strLen); +} diff --git a/Application/Home/Controller/PromoteController.class.php b/Application/Home/Controller/PromoteController.class.php index e0c1b4427..b09ae54ac 100644 --- a/Application/Home/Controller/PromoteController.class.php +++ b/Application/Home/Controller/PromoteController.class.php @@ -899,6 +899,13 @@ class PromoteController extends BaseController $query = M('promote', 'tab_')->where($map); list($records, $pagination, $count) = $this->paginate($query); + foreach ($records as $key => $value) { + + $records[$key]['idcard'] = encryption($value['idcard']); + $records[$key]['mobile_phone'] = encryption($value['mobile_phone']); + + } + $ids = array_column($records, 'id'); $countList = []; diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index ed8d1a423..d879f4942 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -118,11 +118,11 @@