修改身份证加密显示方式

master
zhengchanglong 5 years ago
parent cbf74bca5d
commit 8a241cceb8

@ -596,4 +596,10 @@ function encryptStr($str) {
$stars_str = $stars_str."*";
}
return substr_replace($str, $stars_str, 3, $length-6);
}
function encryptIdCard($str) {
$length = strlen($str);
$stars_str = "****";
return substr_replace($str, $stars_str, $length-4, 4);
}

@ -113,7 +113,7 @@
<tr>
<td class="l">身份证号</td>
<td class="r">
<input type="text" class="txt" value="{$data['idcard']|encryptStr}" readonly>
<input type="text" class="txt" value="{$data['idcard']|encryptIdCard}" readonly>
<span id="idcard" class="table_click"><span class="table_click_text inner-click-text">点击修改</span></span>
</td>
</tr>

Loading…
Cancel
Save