From 2eb03d29f563a59afc19c951f98077baaa8c8277 Mon Sep 17 00:00:00 2001 From: Default User Date: Sat, 31 Jan 2026 09:57:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=8C=E7=BB=B4=E7=A0=81?= =?UTF-8?q?=E6=A0=87=E8=AF=86=EF=BC=9A=E4=B8=BA=E9=82=80=E8=AF=B7=E4=BA=8C?= =?UTF-8?q?=E7=BB=B4=E7=A0=81=E5=92=8C=E5=AF=BC=E5=87=BA=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E4=BA=8C=E7=BB=B4=E7=A0=81=E6=B7=BB=E5=8A=A0=E6=B8=85=E6=99=B0?= =?UTF-8?q?=E7=9A=84=E6=A0=87=E8=AF=86=E5=92=8C=E4=BD=9C=E7=94=A8=E8=AF=B4?= =?UTF-8?q?=E6=98=8E=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=81=94=E7=B3=BB=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- certificate.html | 38 ++++++++++++++++++++++++++++++++++---- invite.html | 7 +++++-- view.html | 8 +++++++- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/certificate.html b/certificate.html index 2606609..f8504f0 100644 --- a/certificate.html +++ b/certificate.html @@ -429,9 +429,9 @@ - + - +
@@ -552,6 +552,12 @@ return dateValue; } + // 隐藏电话号码中间四位 + function hidePhoneNumber(phone) { + if (!phone || phone.length !== 11) return phone; + return phone.substring(0, 3) + '****' + phone.substring(7); + } + // 显示合格证信息 function displayCertificate(certificate) { const container = document.getElementById('certificateInfo'); @@ -580,7 +586,7 @@
联系方式: - ${certificate.contact || ''} + ${hidePhoneNumber(certificate.contact) || ''}
开具日期: @@ -839,6 +845,15 @@ padding: 20px; `; + // 创建二维码标题 + const qrTitle = document.createElement('h3'); + qrTitle.style.cssText = ` + color: #28a745; + margin-bottom: 15px; + font-size: 20px; + `; + qrTitle.innerHTML = '📋 导出信息二维码'; + // 创建二维码图片 const qrImage = document.createElement('img'); qrImage.id = 'qrCodeImage'; @@ -859,8 +874,11 @@ text-align: center; margin-bottom: 20px; max-width: 90%; + background-color: rgba(40, 167, 69, 0.1); + padding: 15px; + border-radius: 8px; `; - qrText.innerHTML = '扫描二维码查看完整信息
长按保存二维码'; + qrText.innerHTML = '

作用:查看完整的合格证信息

扫描二维码查看完整信息
长按保存二维码

'; // 创建关闭按钮 const closeBtn = document.createElement('button'); @@ -900,6 +918,7 @@ qrImage.src = qrCodeUrl; // 组装容器 + qrContainer.appendChild(qrTitle); qrContainer.appendChild(qrImage); qrContainer.appendChild(qrText); qrContainer.appendChild(closeBtn); @@ -1027,6 +1046,17 @@ window.onload = function() { loadCertificate(); setupDateInput(); + + // 自动检查提交状态,如果未提交则弹出填写窗口 + setTimeout(function() { + const sessionId = getSessionId(); + const hasSubmitted = sessionStorage.getItem('certificateSubmitted_' + sessionId); + + if (!hasSubmitted) { + // 未提交过,自动打开填写弹窗 + openModal(); + } + }, 500); // 延迟执行,确保页面完全加载 }; diff --git a/invite.html b/invite.html index 33e777f..ca99423 100644 --- a/invite.html +++ b/invite.html @@ -168,9 +168,12 @@
-

邀请二维码

+

📝 邀请二维码

邀请二维码 -

扫描此二维码进入信息填写页面

+
+

作用:邀请他人填写合格证信息

+

扫描此二维码进入信息填写页面

+
diff --git a/view.html b/view.html index b91dc52..a876fd0 100644 --- a/view.html +++ b/view.html @@ -258,7 +258,7 @@
联系方式: - ${certificate.contact || ''} + ${hidePhoneNumber(certificate.contact) || ''}
开具日期: @@ -299,6 +299,12 @@ return dateValue; } + // 隐藏电话号码中间四位 + function hidePhoneNumber(phone) { + if (!phone || phone.length !== 11) return phone; + return phone.substring(0, 3) + '****' + phone.substring(7); + } + // 页面加载时加载信息 window.onload = function() { loadCertificate();