From 448b10a2b37ae07c6fd54010b8b95ec26fddbb42 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Thu, 24 Mar 2022 19:29:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Application/Common/Common/extend.php | 16 ++++++++++++++++ .../Home/View/default/GameRebate/records.html | 6 +++--- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/Application/Common/Common/extend.php b/Application/Common/Common/extend.php index 2f3c05a84..df438801d 100644 --- a/Application/Common/Common/extend.php +++ b/Application/Common/Common/extend.php @@ -3090,4 +3090,20 @@ function getRandomPassword($length, $special = false){ $password .= $chars[mt_rand(0, $charsLen)]; } return $password; +} + +function encodeStr($str) +{ + # 判断字符串长度 + $length = strlen($str); + if ($length == 1) { + # 长度为 1 前后拼接 * 号 + $newStr = $str.'*'.rand(1,6); + }else{ + # 长度超过1随机插入 * 号 + $newStr = substr_replace($str,str_repeat('*',$length/2),ceil($length/2),$length).mb_substr($str,$length-2,$length,"utf-8"); + // str_repeat('*',$length/2) 星号重复字符长度的一半长度 + // ceil($length/2) 算出从第几个字符开始 + } + return $newStr; } \ No newline at end of file diff --git a/Application/Home/View/default/GameRebate/records.html b/Application/Home/View/default/GameRebate/records.html index dc5aed4f9..e22631618 100644 --- a/Application/Home/View/default/GameRebate/records.html +++ b/Application/Home/View/default/GameRebate/records.html @@ -221,10 +221,10 @@ {$data.base_game_name} {$data.server_name} - {$data.user_account} + {$data.role_id} {$data.role_name} - {$data.promote_account} + {$data.pay_amount} @@ -279,7 +279,7 @@ {$data.review_time} - {$data.reviewer_username} +