diff --git a/certificate.html b/certificate.html index 0988707..ae88a24 100644 --- a/certificate.html +++ b/certificate.html @@ -531,10 +531,10 @@ return dateValue; } - // 隐藏电话号码中间四位 + // 完全隐藏电话号码,全部显示为*号 function hidePhoneNumber(phone) { - if (!phone || phone.length !== 11) return phone; - return phone.substring(0, 3) + '****' + phone.substring(7); + if (!phone) return phone; + return '*'.repeat(phone.length); } // 隐藏主体名称中间部分,只显示第一个字和最后一个字