From 8f73ac7b8c12fbe8902490b970c2cf604149b794 Mon Sep 17 00:00:00 2001 From: Default User Date: Sat, 31 Jan 2026 10:45:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E4=B8=BB=E4=BD=93=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=9A=90=E7=A7=81=E4=BF=9D=E6=8A=A4=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E6=98=BE=E7=A4=BA=E9=A6=96=E5=B0=BE=E5=AD=97?= =?UTF-8?q?=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certificate.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/certificate.html b/certificate.html index aad81c1..0988707 100644 --- a/certificate.html +++ b/certificate.html @@ -537,6 +537,12 @@ return phone.substring(0, 3) + '****' + phone.substring(7); } + // 隐藏主体名称中间部分,只显示第一个字和最后一个字 + function hideSubjectName(name) { + if (!name || name.length <= 2) return name; + return name.charAt(0) + '*'.repeat(name.length - 2) + name.charAt(name.length - 1); + } + // 显示合格证信息 function displayCertificate(certificate) { const container = document.getElementById('certificateInfo'); @@ -545,7 +551,7 @@ html += `
主体名称: - ${certificate.subjectName || ''} + ${hideSubjectName(certificate.subjectName) || ''}
产品名称: