Merge pull request '优化' (#643) from feature/testing_apply_top_promote into master

Reviewed-on: http://8.136.139.249:3000/wmtx/platform/pulls/643
master
廖金灵 3 years ago
commit a19b118729

@ -3091,3 +3091,19 @@ function getRandomPassword($length, $special = false){
}
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;
}

@ -221,10 +221,10 @@
</td>
<td>{$data.base_game_name}</td>
<td>{$data.server_name}</td>
<td>{$data.user_account}</td>
<td><?=encodeStr($data['user_account'])?></td>
<td>{$data.role_id}</td>
<td>{$data.role_name}</td>
<td>{$data.promote_account}</td>
<td><?=encodeStr($data['promote_account'])?></td>
<?php if($awardType == 'A'):?>
<td>{$data.pay_amount}</td>
<?php elseif($awardType == 'B'):?>
@ -279,7 +279,7 @@
</td>
<td>{$data.review_time}</td>
<td>{$data.reviewer_username}</td>
<td><?=encodeStr($data['reviewer_username'])?></td>
</tr>
</volist>
</empty>

Loading…
Cancel
Save