From dbaf93b6305804e585c7fadf1b3c63fcdc86d3f8 Mon Sep 17 00:00:00 2001 From: zhengchanglong Date: Sat, 21 Dec 2019 11:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9D=9E=E7=AE=A1=E7=90=86=E5=91=98=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=8A=A0=E5=AF=86=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Admin/Common/function.php | 21 +++++++++++++++++++ .../Controller/PromoteController.class.php | 1 + Application/Admin/View/Promote/edit.html | 12 +++++++++-- Application/Admin/View/Query/settlement.html | 2 +- Application/Admin/View/Query/withdraw.html | 2 +- 5 files changed, 34 insertions(+), 4 deletions(-) diff --git a/Application/Admin/Common/function.php b/Application/Admin/Common/function.php index 1b51e7fd5..5ee3ae3ff 100644 --- a/Application/Admin/Common/function.php +++ b/Application/Admin/Common/function.php @@ -603,6 +603,12 @@ function encryptStr($str) { return substr_replace($str, $stars_str, 3, $length-6); } +/** + * 身份证加密 + * + * @param $str + * @return mixed + */ function encryptIdCard($str) { $length = strlen($str); $stars_str = ""; @@ -610,4 +616,19 @@ function encryptIdCard($str) { $stars_str = "****"; } return substr_replace($str, $stars_str, $length-4, 4); +} + +/** + * 真实名字加密 + * + * @param $str + * @return mixed + */ +function encryptRealName($str) { + $length = strlen($str); + $stars_str = ""; + if($length>=4){ + $stars_str = "****"; + } + return substr_replace($str, "**", 3, $length); } \ No newline at end of file diff --git a/Application/Admin/Controller/PromoteController.class.php b/Application/Admin/Controller/PromoteController.class.php index 3ad96d425..8cca0add6 100644 --- a/Application/Admin/Controller/PromoteController.class.php +++ b/Application/Admin/Controller/PromoteController.class.php @@ -348,6 +348,7 @@ class PromoteController extends ThinkController $this->assign('commonset', M('Kuaijieicon')->where(['url'=>'Promote/lists/type/1','status'=>1])->find()); $companys = M('promote_company', 'tab_')->where(['status' => 1])->select(); + $this->assign("is_admin",is_administrator()); $this->assign('companys', $companys); $this->display(); } diff --git a/Application/Admin/View/Promote/edit.html b/Application/Admin/View/Promote/edit.html index 3c78cf76d..0ec8cd257 100644 --- a/Application/Admin/View/Promote/edit.html +++ b/Application/Admin/View/Promote/edit.html @@ -84,13 +84,21 @@ 真实姓名: - + + + + + 手机号码: - + + + + + diff --git a/Application/Admin/View/Query/settlement.html b/Application/Admin/View/Query/settlement.html index ef6c3a3af..12512b82d 100644 --- a/Application/Admin/View/Query/settlement.html +++ b/Application/Admin/View/Query/settlement.html @@ -336,7 +336,7 @@ {:get_promote_name($data['promote_id'])} - {:get_promote_name($data['promote_id'])|encryptStr} + {:encryptStr(get_promote_name($data['promote_id']))} {$data.starttime|date='Y-m-d',###}至{$data.endtime|date='Y-m-d',###} diff --git a/Application/Admin/View/Query/withdraw.html b/Application/Admin/View/Query/withdraw.html index 6e2a3d73f..4a3131a7e 100644 --- a/Application/Admin/View/Query/withdraw.html +++ b/Application/Admin/View/Query/withdraw.html @@ -139,7 +139,7 @@ {:get_promote_name($data['promote_id'])} - {:get_promote_name($data['promote_id'])|encryptStr} + {:encryptStr(get_promote_name($data['promote_id']))} {$data.create_time|date='Y-m-d H:i:s',###}---