diff --git a/Application/Base/Repository/TestingResourceRepository.class.php b/Application/Base/Repository/TestingResourceRepository.class.php index d0cb05e44..98b2f45cc 100644 --- a/Application/Base/Repository/TestingResourceRepository.class.php +++ b/Application/Base/Repository/TestingResourceRepository.class.php @@ -482,6 +482,22 @@ class TestingResourceRepository ]; } + private 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; + } + public function makeTestingRoleRecords($roles) { $result = $this->statByRoles($roles); @@ -553,11 +569,11 @@ class TestingResourceRepository 'server_name' => $role['server_name'], 'server_id' => $role['server_id'], 'role_id' => $role['role_id'], - 'user_account' => $role['user_account'], + 'user_account' => $this->encodeStr($role['user_account']), 'user_phone' => $user ? $user['phone'] : '', 'role_name' => $role['role_name'], 'binding_id' => $binding ? $binding['id'] : 0, - 'bind_user_account' => $bindingRole ? $bindingRole['user_account'] : '', + 'bind_user_account' => $bindingRole ? $this->encodeStr($bindingRole['user_account']) : '', 'bind_role_name' => $bindingRole ? $bindingRole['role_name'] : '', 'base_quota' => $gameSetting ? $gameSetting['base_quota'] : 0, 'other_quota' => intval($role['testing_other_quota']), diff --git a/Application/Home/Controller/QueryController.class.php b/Application/Home/Controller/QueryController.class.php index aaf62e9dc..a5fe4a1d0 100644 --- a/Application/Home/Controller/QueryController.class.php +++ b/Application/Home/Controller/QueryController.class.php @@ -1812,6 +1812,7 @@ class QueryController extends BaseController 'user.register_ip', 'user.login_time', 'user.login_ip', + 'role.server_id', 'role.server_name', 'role.sdk_version', 'role.role_name', diff --git a/Application/Home/View/default/Query/recharge.html b/Application/Home/View/default/Query/recharge.html index 09261f01d..9bdd865f6 100644 --- a/Application/Home/View/default/Query/recharge.html +++ b/Application/Home/View/default/Query/recharge.html @@ -199,6 +199,7 @@