Browse Source

修改电话号码显示方式,完全隐藏为*号

master
Default User 1 month ago
parent
commit
63273558f5
  1. 6
      certificate.html

6
certificate.html

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

Loading…
Cancel
Save